HTML Flashcards

1
Q

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

A

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

Body Element

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

Where do the head element and body element 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 declare to the browser what HTML type 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

<a> <img></img></a>

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 provide more information to the HTML 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;”

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 start a new line and take up the entire span of the parent element.

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 only take up the space of the content that they enclose and share the same line as their neighboring elements.

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% Height: 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

Width: auto Height: 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 lists are numbered and unordered lists are marked by 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

Block element

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

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

What is an absolute URL?

A

The full web address of 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

Short hand address to pages within the same website

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

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

A

../”example.html”

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

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

A

Just refer directly to the target directory

19
Q

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

A

../../example.html

20
Q

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

A

Just use the file name directly

21
Q

What is the purpose of an HTML form element?

A

To collect data from the end user

22
Q

Give five examples of form control elements.

A

input, text area, select, option, button

23
Q

Give three examples of type attributes for HTML input elements.

A

text, password, radio, checkbox, file, submit, image, hidden

24
Q

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

A

inline element

25
What are the six primary HTML elements for creating tables?
table, th, tr, td, thead, tbody
26
What purpose do the thead and tbody elements serve?
thead houses the headings of the table and tbody houses the data of the table
27
Give two examples of data that would lend itself well to being displayed in a table.
Train ticket prices and sports results
28
What are the names of the individual pieces of a CSS rule?
selector, declaration block, property, value
29
In CSS, how do you select elements by their class attribute?
Add a . before the class name
30
In CSS, how do you select elements by their type?
Just use the element type name
31
In CSS, how do you select an element by its id attribute?
Add a # before the id name
32
Name three different types of values you can use to specify colors in CSS.
Color name, RGB value, hex code
33
What CSS properties make up the box model?
content, padding, border, margin
34
Which CSS property pushes boxes away from each other?
margin
35
Which CSS property add space between a box's content and its border?
padding
36
What is a pseudo-class?
Keyword applied by the browser to an element for specific circumstances such as user's interaction ie hovering over the element
37
What are CSS pseudo-classes useful for?
Applying styling based on user's interaction
38
Name at least two units of type size in CSS.
pixel, percentage, ems
39
What CSS property controls the font used for the text inside an element?
font-family
40
What is the default flex-direction of a flex container?
row
41
What is the default flex-wrap of a flex container?
nowrap
42
Why do two div elements "vertically stack" on one another by default?
div elements are block-level elements
43
What is the default flex-direction of an element with display: flex?
row