HTML Flashcards

1
Q

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

A

head

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

body

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

Between the html tags.

head and body tags are siblings

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

What is the purpose of the !DOCTYPE declaration?

A

To indicate the HTML version

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

Give 5 examples of HTML element tags.

A
P
Span
img
h1
h2
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

provides additional information about 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

& amp = ampersand (&)

no space between & and amp

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

Causes a line break.

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

Continues on the same line.

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 = 100% of the parent element's width
Height = tall as its 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

Only takes up as much width and height as necessary (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 = Items are numbered to indicate there is an order
Unordered = Items begin with a bullet point or other symbol

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

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 tags

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

What is an absolute URL?

A

It is the full address.

Used to link to an external website.

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

What is a relative URL?

A

Shorthand where you don’t need to specify the domain name.

Used for internal navigation.

17
Q

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

A

../file-name

18
Q

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

A

child-directory/file-name

19
Q

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

A

../../file-name

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 HTML form element?

A

To allow users to submit information to the server.

Contains user form input elements

22
Q

Give 5 examples of form control elements.

A

Input, Label, Textarea, Select, Option

23
Q

Give 3 examples of type attributes for HTML input elements.

A

Text, Checkbox, Color

24
Q

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

25
What are the six primary HTML elements for creating tables?
table, thead, tbody, th, tr, td
26
What purpose do the thead and tbody elements serve?
Semantic reasons, helps people with screen readers, allows you to style them differently
27
Give two examples of data that would lend itself well to being displayed in a table?
Financial Statements, Comparing features on multiple items