HTML Flashcards

1
Q

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

A

In the head element.

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

In the body element.

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

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

A

In the html element.

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

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

A

It tells the browser what version of HTML the document is written in.

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

Give five examples of HTML element types.

A

Head, body, div, article, nav.

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

What is the purpose of HTML attributes?

A

Attributes provide additional information about elements.

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

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

A

© (copyright symbol)

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

How do block-level elements affect the document flow?

A

A block-level element occupies the entire horizontal space (100%) of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”. (Breaks the flow of content).

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

How do inline elements affect the document flow?

A

Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of 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 a block-level element?

A

Width is 100% of the parent element, and height is determined by the inner content (auto).

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

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

A

Width and height are determined based on the inner content (both are auto).

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

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

A

An ordered list is listed in numerical order by default, and and unordered list is listed with bullet points as default.

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

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

A

Lists are block-level elements.

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

What HTML tag is used to link to another website?

A

Anchor tags.

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

What is an absolute URL?

A

An anchor tag that links to an external webpage.

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

What is a relative URL?

A

An anchor tag that links to an internal section on the webpage, or another webpage within the website.

17
Q

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

A

Use ../

18
Q

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

A

Example: index/index.html

19
Q

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

A

Use ../../

20
Q

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

A

Use ./ or (example: index.html)

21
Q

What is the purpose of an HTML form element?

A

Allows users to submit information and allows websites to collect info from users. Also, allows you to group together form control elements. (Sets up boundary of form).

22
Q

Give five examples of form control elements.

A

<input></input>, <button>, <checkbox>, <select>, <option></option></select></checkbox></button>

23
Q

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

A

type=”checkbox”, type=”radio”, type=”submit”

24
Q

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

A

It is an inline-block element.

25
Q

What are the six primary HTML elements for creating tables?

A

table, thead, tbody, th, tr, td and (possibly tfooter).

26
Q

What purpose do the <thead> and <tbody> elements serve?

A

Distinguish between the main content of the table and the first and last rows (which can contain different information).

Help people who use screen readers.

Allow you to style these sections in a different manner than the rest of the table.

27
Q

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

A

Financial reports, TV schedules, sports results, grades, etc.