HTML Flashcards

1
Q

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

A

The head element. It contains metadata - information about the data aka information about the website not seen by the user or displayed on the webpage

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

The body element. Content in the body element will be displayed on the webpage

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

Within 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

To inform the browser which version of html is being used. !DOCTYPE html tells the browser to use the most up to date (or recent) version of html, which is currently html 5.

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

heading (h1, h2, etc), img, span, body, 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

to add information that configures or adjusts the behavior of 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

& copy ; © (copyright symbol)
& reg ; ® (registered trademark)

Note - no spaces between the ampersand, letters, and semi-colon

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

Block-level elements take up the entire width of their container. An element placed after a block element in html will appear below it on a new line.

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 up the space they need (aka the space of their 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

Height - is the height of its content

Width - is the width of its container

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: The width of its content

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 used for organized ordered content in a numbered list. An unordered list is used for lists where organization does not mater; they are displayed 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

An HTML list is a block element. (the li elements within ul or ol are also block elements themselves)

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

Anchor element: a href=”””

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 to an external source

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 to the same site or directory

17
Q

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

A

../filename

18
Q

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

A

directory/filename

19
Q

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

A

../../filename

20
Q

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

A

Just use the file name

21
Q

What is the purpose of an HTMLformelement?

A

Get information from the user

22
Q

Give five examples of form control elements

A

input, select, button, option, text area

23
Q

Give three examples oftypeattribute values for HTMLinputelements.

A

password, radio, text

24
Q

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

A

Inline (inline-block)

25
Q

What are the six primary HTML elements for creating tables?

A

table, thead, th, tbody, tr, td,(tfoot) not necessary but can be used for styling purposes

26
Q

What purpose do thetheadandtbodyelements serve?

A

thead is for the headings for the data

tbody is used for the data

27
Q

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

A

Stocks and sports data

28
Q

Which HTML meta tag is used in mobile-responsive web pages?

A

Viewport meta tag