HTML Flashcards

1
Q

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

A

It goes inside of 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

It goes inside of 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 tags.

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

What is the purpose of doctype declaration?

A

It tells the browser which version of HTML the page is using.

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

Give 5 examples of HTML element types.

A

span, p, img, div, h1

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

What are HTML entities? Provide an example.

A

They are also known as escape characters. They are characters that are used and reserved by HTML code. Example: cent sign –> ¢ or ¢

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

They will always appear on a new line. They do not allow other elements on the same horizontal row.

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

They appear on the same line as their neighboring elements.

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

What are the default widths and heights of a block-level element?

A

The height is determined by the content inside the element. The width is the full horizontal width of its container block.

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

What are the default widths and heights of an inline element?

A

The width and height of an inline element is determined by the content of the element.

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 show items that are listed with numbers while an unordered list starts with bullet points.

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

It is a block-level element – it pushes everything after it down the page.

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

What HTML tag is used to link another website?

A

The anchor tag // <a> tag along with the href attribute and the link to the website as the value.</a>

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 a site or the direct URL to a file

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

What is a relative URL?

A

Shorthand url to a link on 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

../ followed by file name

17
Q

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

A

Name of the child folder followed by the file name

18
Q

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

A

../../ to move up 2 folders then follow with file name

19
Q

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

A

Just use the file name by itself.

20
Q

What’s the purpose of an HTML form element?

A

To collect information/data from users

21
Q

Give 5 examples of form control elements.

A

input, select, textarea, button, option

22
Q

Give 3 examples of type attribute values for HTML input elements

A

radio: allows users to pick from a variety of options
checkbox: allows users to check
password: allows users to enter passwords

23
Q

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

A

Trick question – it’s an inline-block element. They are similar to inline elements but have padding and margins added to all 4 sides.

24
Q

What are the 6 primary HTML elements for creating tables?

A

table, thead, tbody, th (table heading), tr (table row), td (table data)

25
What purpose do the thead and tbody elements serve?
It allows you to style the sections differently and helps with accessibility for screen reading
26
Give two examples of data that would lend itself well to being displayed in a table.
Stock market data/values, events schedule, sports finish times