HTML Flashcards

1
Q

Where do you put non-visible content about the HTML document?

A

Non-visible content goes between the head tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where do you put visible content about the HTML document?

A

Visible content should go into the body tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of a < !DOCTYPE > declaration?

A

is used to tell the browser what version of HTML we are using.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give five examples of HTML element types.

A
img
p
h1 - h6 
span
body
head
html
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of HTML attributes?

A

Attributes are extra information being provided about the elements contents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give an example of an HTML entity (escape character).

A

& l t ; = <
& a m p ; = &

(minus the spaces)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do block-level elements affect the document flow?

A

Block-level elements take up the entire line of a document. They start on new lines and take up the entire line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do inline elements affect the document flow?

A

Inline elements will stay on the same line as the neighboring content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the default width and height of a block-level element?

A

Default width is the width of the container, the full width available. “100%”

Default height is the height of the content, “auto”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the default width and height of an inline element?

A

Default width is the width of the content. “Auto”

Default height is the height of the content. “Auto”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between an ordered list and an unordered list in HTML?

A

<ol> Ordered list - items are ordered. 1, 2, 3.

| </ol>

<ul> Unordered list - lists that are bullet points</ul>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Is an HTML list a block element or an inline element?

A

ordered and unordered lists are both block elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What HTML tag is used to link to another website?

A

the anchor tag “< a >” (without spaces)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an absolute URL?

A

The full web address for an external website

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a relative URL?

A

Links to other pages within the same website

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you indicate the relative link to a parent directory?

A

In the href, include “../” in front of the file name

Ex href = “../index.html” (isn’t always index, must be the name of the direct parent file

17
Q

How do you indicate the relative link to a child directory?

A

In the href, include the name of the child folder, and then the page you would like to redirect to

Ex href = “music/listings.html”

18
Q

How do you indicate the relative link to a grand parent directory?

A

Similar to the parent directory, but you include “../” for every step you want to go up

Ex href = “../../index.html”

19
Q

How do you indicate the relative link to the same directory?

A

Set href to the name of the file you want to redirect to, nothing else is needed.

20
Q

What is the purpose of an HTML form element?

A

To collect information from users that visit the website

21
Q

Give five examples of form control elements.

A

< input >

< textarea >

< select >

< label >

< button >

< fieldset >

22
Q

Dropdown menus

Give three examples of type attribute values for HTML < input > elements.

A

type=”input” (text input)

type=”password” (hidden text input for passwords

type=”radio” (single selection boxes.

23
Q

Is an HTML < input > element a block element or an inline element?

A

Inline

24
Q

What are the six primary HTML elements for creating tables?

A
table
thead
tbody
tr
td
th

(each of these need to be surrounded by tags < > when using in html)

25
Q

What purpose do the thead and tbody elements serve?

A

thead defines the rows that define the “headings” of the table

tbody defines the body of the table. holds the < tr > elements that set the number of rows in a table.

26
Q

Give two examples of data that would lend itself well to being displayed in a table.

A

sports results
stock reports
financial reports
calendars

27
Q

Which HTML meta tag is used in mobile-responsive web pages?

A

meta name = ‘viewport’ content = ‘width=device-width, initial-scale=1’