HTML Flashcards

1
Q

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

A

head element

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

Where do the head and body tags go in a valid HTML document?

A

html element

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

Tell browser what version of HTML the page is using.

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

Give five examples of HTML element tags.

A

head, body, html, p, h1, title, etc

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

Provide additional information about the contents of an element.

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

greater than sign, less than sign, &, “, ‘

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

Start a new line in the browser window.

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

Continue on the same line as their neighbor elements.

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

Takes up the full width available and as tall as the content.

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

Takes up only as much width as necessary and as tall as the content.

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

Ordered lists uses numbers and unordered lists uses bullets.

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

block element

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

<a> anchor element with the href attribute. </a>

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

What is an absolute URL?

A

When linking to a different website, href value is the full web address. (look for https:)

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

What is a relative URL?

A

When linking to another page within the same site, href value does not need to specify domain name in URL.

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

../file-name

a href=”../file-name.html”

17
Q

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

A

folder-name/file-name

a href=”folder-name/file-name.html”

18
Q

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

A

../../file-name

a href=”../../file-name.html”

19
Q

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

A

file-name

a href=”file-name.html”

20
Q

What are the six primary HTML elements for creating tables?

A

table, thead, tbody, th, td, tr

21
Q

What purpose do the thead and tbody elements serve?

A

thead defines a set of rows defining the head of the columns of the table.

tbody encapsulates a set of table rows, indicating that they comprise the body of the table.

22
Q

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

A

a person and their age, or a day of the week, or the timetable for a local swimming pool.

23
Q

What is the purpose of an HTML form element?

A

To retrieve and group information from visitors to your site

24
Q

Give five examples of form control elements.

A

input, textarea, select, option, button, label

25
Q

Give three examples of type attributes for HTML input elements.

A

Submit, text, radio

26
Q

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

A

Inline

27
Q

Where do you put visible content about the HTML document?

A

body element