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

Both the <head> and <body> elements go in the <html> element. The <head> element comes before the <body> 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 clarifies to the browser which version of HTML we are using so that it can display the page properly.

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

<html> element, <head> element, <title> element, <body> element, <p> element
</p></body></title></head></html>

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 more information about the contents of an element, and are comprised of a name and value.

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

&lt is needed to write a left-angled bracket, since the left-angled bracket is symbol used in HTML syntax.

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

These elements will appear to start on a new line of the page.

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

These elements will appear to continue right after the last element, in-line with eachother.

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 is the entire horizontal space of the its parent element, and height is the vertical length of the contents.

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 and height are determined by how much space the contents of the element take up.

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 numbered, whereas an unordered list will simply be broken down in 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

Lists are block 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

The <a> tag followed by an href attribute.</a>

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

What is an absolute URL?

A

An absolute URL is a uniform resource locator that contains the full web address you would type into a browser if you wanted to visit a specific page on the web.

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

What is a relative URL?

A

A relative uniform resource locator is a link that connects to pages within the same site.

17
Q

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

A

../nameOfFile.html

18
Q

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

A

nameOfFolder/nameOfFile.html

19
Q

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

A

../../nameOfFile.html

20
Q

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

A

nameOfFile.html

21
Q

What is the purpose of an HTML form element?

A

It allows the user of the website to submit information to a database.

22
Q

Give five examples of form control elements.

A

input, label, select, form, textarea

23
Q

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

A

checkbox, radio, submit

24
Q

Is an HTML <input></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

The thead element holds all the headings of the table, while the tbody element contains the table’s data.

27
Q

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

A

A public company’s financial data.
Cost comparisons for different airlines.