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

head and body are siblings

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 a browser which 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, body, p, h1, div

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

Less-than sign <
Copyright symbol ©
Registered trademark ®

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

Block level elements will always appear to start on a new line in the browser window

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

Inline elements will always appear to continue on the same line as their neighbouring 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 always starts on a new line and takes up the full width available

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

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

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 list is a list where each item in the list in numbered and unordered list is a list that 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

Links are created using the 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

An absolute URL starts with the domain name for that site, and can be followed by the path to a specific page

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

What is a relative URL?

A

A shorthand version of absolute URLs because you do not need to specify the domain name

17
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

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

A

Repeat the ../ to indicate that you want to go up two folders, then follow it with the file name

20
Q

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

A

Just use the file name

21
Q

What is the purpose of an HTML form element?

A

Form element allows you to collect information from visitors to your site

22
Q

Give five examples of form control elements.

A
Text input
Password input
Text area
Radio button
Checkbox
23
Q

Give three examples of type attributes for HTML elements.

A

type=”text”
type=”checkbox”
type=”radio”

24
Q

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

A

Inline element

25
What are the six primary HTML elements for creating tables?
``` table element tr element td element th element thead element tbody element ```
26
What purpose do thead and tbody elements serve?
Distinguish between the main content of the table and the first row Help people who use screen readers Allow you to style these sections in a different manner using CSS
27
Give two examples of data that would blend itself well to being displayed in a table.
Income statement | Calendar schedule