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
Q

What are the six primary HTML elements for creating tables?

A
  1. Table
  2. tablehead
  3. tr
  4. th
  5. td
  6. tbody
    * 7. tfoot
26
Q

What purpose do the thead and tbody elements serve?

A

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
Q

Give two examples of data that would lend itself well to being displayed in a table.

A

Finances and lap times on a track

28
Q

What are the names of the individual pieces of a CSS rule?

A

Selector, Declaration block, Property and it’s value

29
Q

In CSS, how do you select elements by their class attribute?

A

with a period followed by the class name

30
Q

In CSS, how do you select elements by their type?

A

Just use the name of the element needing to be selected

31
Q

In CSS, how do you select an element by its id attribute?

A

Use a hashtag followed by the id name

32
Q

Name three different types of values you can use to specify colors in CSS.

A

RGB Values
Hex Codes
Color Names

33
Q

What CSS properties make up the box model?

A

Border
Margin
Padding
Content - Height and Width

34
Q

Which CSS property pushes boxes away from each other?

A

Margin property

35
Q

Which CSS property add space between a box’s content and its border?

A

The padding property

36
Q

What is a pseudo-class?

A

Class applied to an element by the browser when in a specific state

37
Q

What are CSS pseudo-classes useful for?

A
38
Q

Name two types of units that can be used to adjust font-size in CSS.

A

Pixels

em

39
Q

What CSS property controls the font used for the text inside an element?

A

font-family

40
Q

What is the default flex-direction of a flex container?

A

Row

41
Q

What is the default flex-wrap of a flex container?

A

No Wrap

42
Q

Why do two div elements “vertically stack” on one another by default?

A

Because div elements are display type block

43
Q

What is the default flex-direction of an element with display: flex?

A

Row

44
Q

How does setting position: absolute on an element affect where it appears on the page?

A

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