HTML Flashcards

1
Q

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

A

Inside the head element.

The content is known as metadata.

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

A

Inside 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

They are located inside 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

This tells the browser what version of HTML to parse through

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
  1. Head
  2. Body
  3. Div
  4. P
  5. 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 give additional information about the HTML 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

®

always starts with &(ampersand) and ends with ;

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 full width available, will always start force a new line, will stack on top of each-other.

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 display in same line, don’t force a new line after them, only take up as much width as they need.

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 the parent element or of the page.
The default height is 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 is auto.

The default height is 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 1,2,3,4 etc

Unordered lists are 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

HTML List element is 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

The 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

An absolute url is one with an https start

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

What is a relative URL?

A

A relative URL is a file path

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

Use ../ to indicate the folder above the current one, then follow it with the file name

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

Use the name of the child folder, followed by a forward slash, then file name.

19
Q

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

A

Repeat the ../ to indicate that you want to go u two folders, then follow it with the file name
ex. ../../index.html

20
Q

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

A

To link a file in the same folder, just use the file name.(Nothing else is needed)

21
Q

What is the purpose of an HTML form element?

A

A document section containing interactive controls for submitting information.

22
Q

Give five examples of form control elements.

A
  1. Button
  2. Textarea
  3. Input
  4. Select
  5. Input Type
23
Q

Give three examples of type attribute values for HTML input elements.

A
  1. Checkbox
  2. File
  3. Radio
24
Q

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

A

It is inline

25
What are the six primary HTML elements for creating tables?
1. Table 2. tablehead 3. tr 4. th 5. td 6. tbody * 7. tfoot
26
What purpose do the thead and tbody elements serve?
thead houses the headings of the table so titles on columns and rows tbody houses the body of the table so the information to put in the data cells
27
Give two examples of data that would lend itself well to being displayed in a table.
Finances and lap times on a track
28
What are the names of the individual pieces of a CSS rule?
Selector, Declaration block, Property and it's value
29
In CSS, how do you select elements by their class attribute?
with a period followed by the class name
30
In CSS, how do you select elements by their type?
Just use the name of the element needing to be selected
31
In CSS, how do you select an element by its id attribute?
Use a hashtag followed by the id name
32
Name three different types of values you can use to specify colors in CSS.
RGB Values Hex Codes Color Names
33
What CSS properties make up the box model?
Border Margin Padding Content - Height and Width
34
Which CSS property pushes boxes away from each other?
Margin property
35
Which CSS property add space between a box's content and its border?
The padding property
36
What is a pseudo-class?
Class applied to an element by the browser when in a specific state
37
What are CSS pseudo-classes useful for?
38
Name two types of units that can be used to adjust font-size in CSS.
Pixels | em
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?
No Wrap
42
Why do two div elements "vertically stack" on one another by default?
Because div elements are display type block
43
What is the default flex-direction of an element with display: flex?
Row
44
How does setting position: absolute on an element affect where it appears on the page?
an element set with position absolute will appear on top left corner of the nearest ancestor element that is set to a position property that is NOT STATIC