HTML Flashcards

1
Q

Where do the and tags go in a valid HTML document?

A

The element is a container for metadata (data about data) and is placed between the tag and the tag.
The must be the second element after the tag or it should be placed between and tags.

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

What is the purpose of a declaration?

A

The DOCTYPE declaration is an instruction to the web browser about what version of HTML the page is written in. This ensures that the web page is parsed the same way by different web browsers. In HTML 4.01, the DOCTYPE declaration refers to a document type definition (DTD)

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

Give five examples of HTML element types.

A

, , <h1> , </h1><p>,<br></br>,</p>

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

What is the purpose of HTML attributes?

A

HTML attributes can be used to change the color, size, and other features of HTML elements.

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

Give an example of an HTML entity (escape character)

A
&	&
®	®
™	™
©     ©
€     €
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do block-level elements affect the document flow?

A

A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”. Browsers typically display the block-level element with a newline both before and after the element

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

How do inline elements affect the document flow?

A

By default, inline elements do not force a new line to begin in the document flow.

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

What are the default width and height of a block-level element?

A

All block level elements inherit the width of their parent element by default

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

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

A

The height of an inline element is the height of the content. The width of an inline element is the width of the content. The height and width of an inline element cannot be set in CSS. You cannot set the height and width of block-level elements in CSS

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

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

A

Unordered list — Used to create a list of related items, in no particular order. Ordered list — Used to create a list of related items, in a specific order.

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

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

A

Block Level Elements

A block-level element is an HTML element that begins a new line on a web page and extends the full width of the available horizontal space of its parent element. It creates large blocks of content like paragraphs or page divisions. In fact, most HTML elements are block-level elements

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

What HTML tag is used to link to another website?

A

The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the </a><a> element is the href attribute, which indicates the link’s destination.</a>

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

What is an absolute URL?

A

An absolute URL contains all the information necessary to locate a resource.

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

What is a relative URL?

A

A relative URL locates a resource using an absolute URL as a starting point.

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

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

A

../review

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 child directory?

A

href=”music/listings.html”>Listings

17
Q

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

A

href=”../../reviews.html”>reviews

18
Q

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

A

<a>reviews</a>

19
Q

What is the purpose of an HTML form element?

A

The HTML element represents a document section containing interactive controls for submitting information

20
Q

Give five examples of form control elements.

A

The common input types button, checkbox, file, hidden, image, password, radio, reset, submit, and text.

21
Q

Give three examples of type attribute values for HTML elements.

A

button:Defines a clickable button (mostly used with a JavaScript to activate a script)
checkbox:Defines a checkbox
color:Defines a color picker
date:Defines a date control (year, month, day (no time))
datetime-local:Defines a date and time control (year, month, day, time (no timezone)
email:Defines a field for an e-mail address

22
Q

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

A

inline elements

23
Q

What are the six primary HTML elements for creating tables?

A

tr, td, th, thead, tbody, tfoot, table

24
Q

What purpose do the thead and tbody elements serve?

A

The element is used in conjunction with the and elements to specify each part of a table (header, body, footer). Browsers can use these elements to enable scrolling of the table body independently of the header and footer.