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
Q

What are the six primary HTML elements for creating tables?

A

table, th, tr, td, thead, tbody

26
Q

What purpose do the thead and tbody elements serve?

A

thead houses the headings of the table and tbody houses the data of the table

27
Q

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

A

Train ticket prices and sports results

28
Q

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

A

selector, declaration block, property, value

29
Q

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

A

Add a . before the class name

30
Q

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

A

Just use the element type name

31
Q

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

A

Add a # before the id name

32
Q

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

A

Color name, RGB value, hex code

33
Q

What CSS properties make up the box model?

A

content, padding, border, margin

34
Q

Which CSS property pushes boxes away from each other?

A

margin

35
Q

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

A

padding

36
Q

What is a pseudo-class?

A

Keyword applied by the browser to an element for specific circumstances such as user’s interaction ie hovering over the element

37
Q

What are CSS pseudo-classes useful for?

A

Applying styling based on user’s interaction

38
Q

Name at least two units of type size in CSS.

A

pixel, percentage, ems

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

nowrap

42
Q

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

A

div elements are block-level elements

43
Q

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

A

row