HTML Flashcards

1
Q

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

A

Inside the head tags.

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

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

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 tell the browser what version of HTML 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

head, title, body, h1, p tags

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 additional information for the content of an 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

& sign, copyright sign

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 create a new line.

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 appear on 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

A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of 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 an inline element?

A

An inline element does not start on a new line and only takes up as much width as necessary.

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

The items in the ordered list begin with a number.

The items in the unordered list begin with a bullet point.

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

“<a>” anchor tag.</a>

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

What is an absolute URL?

A

A full web address for another site.

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

What is a relative URL?

A

A path linking to another page in the same site.

17
Q

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

A

Use ../

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 the file name.

19
Q

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

A

../../and the file name

20
Q

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

A

just use the file name and ./??

21
Q

What is the purpose of an HTML form element?

A

An HTML form is to collect information from users, allow users to search or perform other functions online.

22
Q

Give five examples of form control elements.

A

input, textarea, select, button, label

23
Q

Give three examples of type attributes for HTML elements.

A

text, submit, radio,

24
Q

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

A

Inline.

25
Q

What are the six primary HTML elements for creating tables?

A

table, tr, th, td, thead, tbody, tfoot

26
Q

What purpose do the thead and tbody elements serve?

A

separate the table content to heading and body, allows you to style them differently and also it helps people who use screen reader.

27
Q

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

A

TV schedule, bank statement

28
Q

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

A

selector (selector group)and declaration block

29
Q

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

A

a dot follow by the value of the class attribute

30
Q

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

A

just type the element name

31
Q

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

A

a # pound sign followed by the value of the id attribute

32
Q

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

A

Color names, RGB values, and Hex codes. (also HSL values)

33
Q

What is a pseudo-class?

A

A CSS pseudo-class is a keyword added to a selector which allows you to apply a style to the element when a user interacts with it.

34
Q

What are CSS pseudo-classes useful for?

A

Links, buttons, form controls.

35
Q

What CSS properties make up the box model?

A

Margin, border and padding.

36
Q

Which CSS property pushes boxes away from each other?

A

Margin.

37
Q

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

A

Padding.