HTML Flashcards

1
Q

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

A

In the head element. This is also where metadata is stored.

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 the html element. Head comes before body.

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

To tell the browser which 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 tags.

A

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

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 provide additional information about the contents of an element. Located in the opening tag of the element.

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

Left angled bracket, ampersand, quotation marks, copyright, registered trademark

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

They always appear on a new line and takes up the full width available.

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

They 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 = auto (entire horizontal space of its parent element and vertical space equal to the height of its contents), height = 100%

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

Height = auto, width = 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

Ordered list is where each item is numbered. Unordered is with bullet points.

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

achor tag, with an href attribute and value of an absolute URL

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

What is an absolute URL?

A

A link that takes you to another website/domain

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

What is a relative URL?

A

A link that takes you to a specific part of the same page or another page on the same website/domain

17
Q

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

A

../index.html

18
Q

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

A

folder/index.html

19
Q

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

A

../../index.html

20
Q

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

A

index.html (just the name of the file)

21
Q

What is the purpose of an HTML form element?

A

to collect info from visitors to your site / boundary for form control elements

22
Q

Give five examples of form control elements.

A

input, textarea, select, option, submit

23
Q

Give 3 examples of type attributes for HTML input elements

A

text, password, file, submit, image

24
Q

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

A

inline

25
Q

What are the six primary HTML elements for creating tables?

A

table, tr, td, th, thead, tbody

26
Q

What purpose do the thead and tbody elements serve?

A

thead contains the headings of table
tbody contains the body
semantic purposes, divider (SEO, indexing, readability)

27
Q

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

A

schedule, financial reports