HTML Flashcards

1
Q

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

A

In the head element. Usually the metadata, script tag, stylesheet, and title.

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

They go in between 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 web browser what version of HTML to use.

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

P, head, body, div, and h1

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

To customize HTML 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

Two examples are the copyright (©) and registered (®) signs. HTML entities are written with the ampersand(&) and some text.

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

Each block level element appears on a new line. They are laid out vertically and take the full width of the page. Their vertical distance from other elements is determined by margins.

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 only take the space they need in their parent element. They don’t appear on new lines.

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

Default width: full-length of the page or value of “auto”

Default height: height of the text content

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

Default width: the width of the text content

Default height: the height of the text content

You can’t set the height and width of an inline element. You’d have to make them a block or inline block element first.

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

Ordered list: numbered

Unordered list: bullet points

Worth noting that the “li” tag stands for list item.

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

Block element

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

The anchor tag or “a” html element.

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

What is an absolute URL?

A

The full URL as someone would type it in the search bar. It includes the protocol, the domain, etc.

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

What is a relative URL?

A

Navigation within your own webpage. It usually looks more like a file path than a link.

17
Q

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

A

Syntax = ../filename

*You have to go to the directory above then specify the file name

18
Q

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

A

Syntax = directoryName/filename

*You have to give the directory name of the child directory then specify the file name

19
Q

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

A

Syntax = ../../filename

*You have to go up two directory, so repeat (../) twice and then specify the file name

20
Q

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

A

Syntax = image-section.html

*Just use the file name

21
Q

What is the purpose of an HTML form element?

A

All the form elements for the related content that a user can input.

22
Q

Give five examples of form control elements.

A

Select, option, textarea, input, and button.

*There’s more though!

23
Q

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

A

Radio, submit, email, checkbox, etc.

24
Q

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

A

Inline element. If you have two input elements, they will sit right next to each other.

25
Q

What are the six primary elements for creating an HTML table?

A

“table”, “thead”, “th”, “tr”, “td”, and “tbody”

*Worth noting that “tfoot” isn’t core for an HTML table.

26
Q

What purpose do the “thead” and “tbody” elements serve?

A

Help for structure, and search indexing for your website.

“thead” = holds the heading titles (“th” element) of the table

“tbody” = holds the table data (“td” element) 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, calendars, etc.