HTML Flashcards

1
Q

Where do you put non-visible content (metadata) 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 (to the user) 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

between the opening and closing tags of 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

instructs the web browser on which version of HTML to use when reading the code

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

Five examples of HTML element types

A

a, b, strong, em, html, form, img

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 information to an element’s content (e.g color)

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

What is an example of an HTML entity?

A

an ampersand, caret, money symbols, copyright, trademark, symbols that are typically used in HTML code (less than/equal than), symbols not on the keyboard

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

Take up the entire width of the parent container; It creates a new line. other elements are pushed below or above it.

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

They are able to exist on the same line as other inline elements; no new line is created

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 the entire width of its parent element/container, the height is the height of the content (auto)

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

The default width and heigh of an inline element is the width and height of its content (auto for both)

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 unordered list in HTML?

A

An ordered list has an emphasis on the order of the listed items; it uses numbers to sequentially list the items.
An unordered list uses bullet points for the listed items; order of the items does not matter

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

unordered list, ordered list, and list items are all 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

anchor / a tag

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

What is an absolute URL

A

takes you to an external page or domain ( another website URL), not in current webpage

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

What is a relative URL?

A

takes you to another page found within the current domain (internal) - e.g. home page of a URL to the contact-us page

17
Q

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

A

../

18
Q

How do you indicate the relative link to a child directory

A

use a backslash

19
Q

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

A

../../

20
Q

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

A

point to the file directly (e.g. index.html)

21
Q

What is the purpose of an HTML form element?

A

To contain all the form controls in a singular block of code

22
Q

Give five examples of form control elements

A

input, option, textarea, select, label

23
Q

Three examples of type attribute for HTML input options

A

email, text, button, checkbox, radio

24
Q

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

A

block element (inline block element)

25
Q

what are the six primary elements used to create a table?

A

table, thead, th, tbody, tr, td

26
Q

What purpose do thead and tbody serve?

A

Helps partition out the code blocks, makes it easier to read

27
Q

two examples of data that would be displayed well in a table

A

data for research/studies, stock prices