HTML Flashcards

1
Q

Where do you put visible content about the HTML document?

A

«a>body</a>>«a>/body</a>>

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

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

A

«a>head</a>>«a>/head</a>>

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

«a>html</a>>«a>/html</a>>

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

What is the purpose of a declaration?

A

to declare what version of HTML the page is being written witih

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>head</a>>«a>/head</a>>, «a>body</a>>«a>/body</a>>, «a>h1</a>>«a>/h1</a>>, «a>header</a>>«a>/header</a>>, «a>h2</a>>«a>/h2</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

It gives or modifies the functionality of an element

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

Where do you put visible content about the HTML document?

A

«a>body</a>>«a>/body</a>>

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

Give an example of an HTML entity (escape character).

A
(with no space before semi-colon and after &)
& amp ; is &
& lt ; is <
& lt ; is >
& #34 ; is "
& #39 ; is '
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do block-level elements affect the document flow?

A

They take up all the horizontal space and only as much height as its content

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

How do inline elements affect the document flow?

A

They take up only as much height and horizontal space as necessary for its contents

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 a block-level element?

A

All of the horizontal as much height as necessary

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

What are the default width and height of an inline element?

A

as much height and width as necessary for element

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

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

A

ordered list is numbered and unordered list is bullet points

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

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

A

«a>block</a>>«a>/block</a>>

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

What HTML tag is used to link to another website?

A

«a>a</a>>«a>/a</a>>

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

What is an absolute URL?

A

A full url that leads to another website

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

What is a relative URL?

A

a link that sends you to another page within the same site

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 parent directory?

A

../index.html

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

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

A

example/index.html

20
Q

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

A

../../index.html

21
Q

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

A

index.html

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 elements.

A

«a>input type=”checkbox”</a>>«a>/input</a>>
«a>input type=”submit”</a>>«a>/input</a>>
«a>input type=”radio”</a>>«a>/input</a>>

24
Q

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

A

inline element

25
Q

What is the purpose of an HTML form element?

A

to hold/store form content

26
Q

What are the six primary HTML elements for creating tables?

A

tr, td, th, thead, tbody, tfoot

27
Q

What purpose do the thead and tbody elements serve?

A

headings of the table should be in the thead element and the body of the table should be in the tbody element

28
Q

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

A

Keeping track of ticket sales and keeping track of how many hours you worked out in a month

29
Q

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

A

hex codes, rgb css function, color names

30
Q

What CSS properties make up the box model?

A

Content, padding, border, margin

31
Q

Which CSS property pushes boxes away from each other?

A

margin

32
Q

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

A

padding

33
Q

What is a pseudo-class?

A

It is a keyword added to a selector that specifies a special state of the selected element

34
Q

What are CSS pseudo-classes useful for?

A

It lets you apply a style to the element when it is in a special state or also to external factors like history with the element

35
Q

Name at least two units of type size in CSS.

A

pixels and percentages

36
Q

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

A

font-family

37
Q

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

A

row

38
Q

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

A

inline

39
Q

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

A

because div elements are block level elements

40
Q

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

A

row

41
Q

What is the default value for the position property of HTML elements?

A

static

42
Q

How does setting position: relative on an element affect document flow?

A

it originally takes place in the normal layout flow, you can modify its final position, which could lead to it overlapping other elements

43
Q

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

A

It does not affect it at all unless you also apply top. bottom, left, or right to it

44
Q

How does setting position: absolute on an element affect document flow?

A

It makes the element not a part of the document flow and it now sits on its own layer

45
Q

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

A

It will make it appear at the very top of the page over other elements in the regular document flow.

46
Q

How do you constrain an absolutely positioned element to a containing block?

A

If the position property is absolute, the containing block is formed by the edge of the padding box of the nearest ancestor element that has a position value other than static

47
Q

What are the four box offset properties?

A

static, fixed, absolute, relative