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

Head element goes at the top of the document, under the HTML opening tag and any metadata describing this document; body element goes underneath the closing tag for the head element and before the closing HTML tag

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

tells the browser which version of HTML the page is using

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

h1, p, img, span, div

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

They provide additional info about the contents 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

×
&
©
®

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 take up the width of their parent element and the height of its contents; they start on a new line and can be visualized like boxes stacking on top of each other; any elements that follow go to 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

Rather than breaking the flow of the document, it takes up only the space bounded by the tags defining the element; an element following an inline element would go right after it if possible

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

The default width is 100% of the width of the parent element and the default height is the height of its contents (auto) that the block-level element contains

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

It only takes up as much width as necessary; space bounded by the tags defining the element

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 lists: are ordered; for series of data with some sort of set data; you can change the way they’re ordered in styling
Unordered lists: bullet-point lists, no specific order

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

list items are also 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 tag with href attribute

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

What is an absolute URL?

A

links us to another website; starts with a domain name for the site and can be followed by the path to a specific page; starts with http or https

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

What is a relative URL?

A

linking to other pages within the same site; don’t need to specify the domain name

17
Q

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

A

../filename

** folder is a list of directions to where everything exists. So the technical term is directory because a folder doesn’t actually hold anything. But we do use them interchangeably.

18
Q

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

A

childfolder/filename

19
Q

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

A

../../filename

20
Q

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

A

filename
or
./filename
**interchangable

21
Q

What is the purpose of an HTML form element?

A

allows users to perform certain functions such as search, etc
contains interactive tools to receive info from the user

22
Q

Give five examples of form control elements. (REVIEW)

A

input, option, text area, select, button

23
Q

Give three examples of type attributes for HTML elements.

A

checkbox, submit, radio, text, email, button, hidden, password

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?
thead, tbody, tr, th, td, tfoot
26
What purpose do the thead and tbody elements serve?
they're helpful to those using screen readers and also allow you to style them differently than the rest of the table semantics; not much difference in functionality
27
Give two examples of data that would lend itself well to being displayed in a table.
schedules, sports results, scientific data any tabular data