HTML Flashcards

1
Q

HTML Skeleton

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

A

In the head element

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

HTML Skeleton

Where do you put visible content about the HTML document?

A

Within the body elements

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

HTML Skeleton

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

A

Between opening and closing tags of HTML elements

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

HTML Skeleton

What is the purpose of a !DOCTYPE declaration?

A

To tell a browser which version of HTML the page is using. And DOCTYPE can also help the browser to render a page correctly

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

HTML Syntax

Give five examples of HTML element types.

A

p, img, header, footer, mark

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

HTML Syntax

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

HTML Syntax

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

A

Less-than sign: <
Greater-than sign: >
Ampersand: &

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

HTML Block and Inline

How do block-level elements affect the document flow?

A

Block-level element always starts on a new line

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

HTML Block and Inline

How do inline elements affect the document flow?

A

Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.

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

HTML Block and Inline

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

A

The default height of a block-level element is the height of the content
The default width of a block-level element is the length of the page

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

HTML Block and Inline

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

A

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

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

HTML Lists

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

A

Ordered lists use numbers and unordered lists use bullet points.

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

HTML Lists

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

HTML Links

What HTML tag is used to link to another website?

A

a tag

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

HTML Links

What is an absolute URL?

A
  • link to a different website

- 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

HTML Links

What is a relative URL?

A

The relative URL is when you link to other pages within the same site.

17
Q

HTML Relative Links

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

HTML Relative Links

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

HTML Relative Links

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

A

Repeat ../ to indicate the folder above the current one, then follow it with the file name.

20
Q

HTML Relative Links

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

A

To link to a file in the same folder, just use the file name

21
Q

HTML Forms

What is the purpose of an HTML form element?

A

To collect information from visitors

  • capture data from users
  • users to input information
22
Q

HTML Forms

Give five examples of form control elements.

A

select, textarea, submit, button, upload, input, form

23
Q

HTML Forms

Give three examples of type attribute values for HTML elements.

A

Password, text, checkbox, radio, email

24
Q

HTML Forms

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

A

inline element

25
Q

HTML Tables

What are the six primary HTML elements for creating tables?

A

Table, tr (table row), td (table data), th (table heading), thead, tbody

26
Q

HTML Tables

What purpose do the thead and tbody elements serve?

A
  1. Help distinguish between the main content of the table and the first and last rows (which can contain different content)
  2. Help people who use screen readers and also allow you to style these sections in a different manner than the rest of the table
  3. The tbody element, along with its cousins thead and tfoot, provide useful semantic information that can be used when rendering for either screen or printer as well as for accessibility purposes.
27
Q

HTML Tables

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

A

A day of the week and a person and their age