HTML Flashcards

1
Q

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

A

Inside 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

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

Inside 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 the < !DOCTYPE > declaration?

A

The < !DOCTYPE > declaration is the instruction to the web browser about what version of HTML the page is written in.

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. < html >
  2. < body >
  3. < title >
  4. < p >
  5. < h1 >
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

Attributes provide additional information about the contents of the element. They appear on the opening tag of the element and are made up of two parts: a name and a value, separated by an equals sign.

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

Ampersand(&) ==> & amp

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

A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”.

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

By default, inline elements do not force a new line to begin in the document flow.

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

By default, a block-level element expands to a width of 100% of its parent container. The height is set to the default 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 height of an inline element is the height of the content. The width of an inline element is the width of the content. Both height and width are set to auto.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
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
13
Q

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

A

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

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

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

A

Repeat the ../ to indicate that you want to go up two folders (rather than one), then follow it with the file name.
Ex. ../../index.html

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

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

A

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

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

What is the purpose of an HTML form element?

A

The HTML element represents a document section that contains interactive controls to submit information to a web server.

17
Q

Give five examples of form control elements.

A
  1. < input >
  2. < textarea >
  3. < select >
  4. < button >
  5. < option >
18
Q

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

A
  1. Radio
  2. Text
  3. Checkbox
19
Q

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

A

Inline element

20
Q

What are the six primary HTML elements for creating tables?

A
  1. < tr >
  2. < td >
  3. < th >
  4. < thead >
  5. < tbody >
  6. < tfoot >
21
Q

What purpose do the thead and tbody elements serve?

A
  1. < thead > The headings of the table should sit inside the thead element
  2. < tbody > The body of the table should sit inside the tbody element
22
Q

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

A
  1. Sports results

2. Financial reports

23
Q

What is the difference between an ordered list and an unordered list in HTML?

A

Ordered lists have numbers and unordered lists have bullet points

24
Q

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

A

Block element.

< li > is also a block element because it takes the entire width

25
Q

What HTML tag is used to link to another website?

A

The < a > element (anchor tag)

26
Q

What is an absolute URL?

A

URL that includes the protocol and domain name. Links directly to the URL

27
Q

What is a relative URL?

A

Links to another section where the URL is placed.

28
Q

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

A
  1. Hex Codes
  2. RGB Values
  3. Color Names
29
Q

What CSS properties make up the box model?

A

Border, margin, and padding

30
Q

Which CSS property pushes boxes away from each other?

A

Margin

31
Q

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

A

Padding

32
Q

What is a pseudo-class?

A

It is a class added to a selector that specifies a special state of the selected elements

33
Q

What are CSS pseudo-classes useful for?

A

Apply styling based on user interaction

34
Q

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

A
  1. px

2. em

35
Q

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

A

font-family

36
Q

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

A

Row

37
Q

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

A

No wrap

38
Q

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

A

They are block elements

39
Q

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

A

Row