HTML Flashcards

1
Q

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

A

font-size CSS property

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

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

A

px and em

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

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

A

nowrap, all items will try to fit on one line

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

What are CSS pseudo-classes useful for?

A

Use CSS Pseudo-classes to Highlight User’s Position

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

What is a pseudo-class?

A

A pseudo-class is a selector that selects elements that are in a specific state, e.g. they are the first element of their type, or they are being hovered over by the mouse pointer.

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

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

A

font-size CSS property

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

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

A

em, px

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

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

A

horizontal

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

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

A

Before or after the body element.

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

Where do you put visible content about the HTML document?

A

The HTML document itself begins with html and ends with html element The visible part of the HTML document is between body and body .

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

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

A

Items display in a row (the flex-direction property’s default is row ). The items start from the start edge of the main axis. The items do not stretch on the main dimension, but can shrink.

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

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

A

Because they are block elements

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

Where do the head and body tags go in a valid HTML document?

A

The element is a container for metadata (data about data) and is placed between the tag and the tag.

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

What is the purpose of a declaration?

A

The DOCTYPE declaration is an 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
15
Q

Give five examples of HTML element types.

A

<h1> </h1>

<p> </p>

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

What is the purpose of HTML attributes?

A

HTML attributes can be used to change the color, size, and other features of HTML elements.

17
Q

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

A

&r.eg;

the dot after the r is not supposed to be there

18
Q

How do block-level elements affect the document flow?

A

By default block elements will consume all of the space in the inline direction,

19
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. Block elements, on the other hand, typically cause a line break to occur (although, as usual, this can be changed using CSS).

20
Q

What are the default width and height of a block-level element?

A

All block level elements inherit the width of their parent element by default.

21
Q

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

A

The height and width of an inline element is exactly the height and width of the content.

22
Q

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

A

Unordered list — Used to create a list of related items, in no particular order. Ordered list — Used to create a list of related items, in a specific order.

23
Q

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

A

Block element.

24
Q

What HTML tag is used to link to another website?

A

<a></a>

25
Q

What is an absolute URL?

A

An absolute URL contains all the information necessary to locate a resource.

26
Q

What is a relative URL?

A

A relative URL is a URL that only includes the path.