HTML Flashcards

1
Q

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

A

Between the head element opening and closing tags.

<head>

</head>

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

Between the body element opening and closing tags.

<body>

</body>

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

Between the doctype declaration and the HTML element opening and closing tags.

<!DOCTYPE html>

<html>

</html>

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

Tells the browser what type of document is being declared/which version of HTML is being used

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

Give five examples of HTML element types.

A

HTML, head, body, p, h1-h6, title

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

Provides information about 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

Ampersand = &
accent on e = é

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 elements that will start on a new row and use the entirety of the row (horizontal space)

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
  • Appears on the same line as their neighboring elements.
  • Depending on the element they can manipulate the style of text content
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
  • Occupies the entire horizontal space of its parent element and height of its content
  • The default height is the height of the content and the width is the entire length of the page
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

The default height and width is the height of the content and the width of the content

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 (alphabetical, etc.) and unordered lists begin with a bullet point (squares, etc.)

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 and href attribute

<a> </a>

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 a site to visit a specific page
(domain name for that site, followed by the path to a specific page)

Using anchor tags

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

What is a relative URL?

A

Links to other pages within the same site
(shorthand versions because they do not need the domain name)

Using directory pathway

17
Q

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

A

Use ../ to indicate the folder above the current one, then the file name

<a href= “../index.html”>

18
Q

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

A

Name of child folder, followed by forward slash, then the file name

<a href= “ child/child.html “ >

19
Q

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

A

You can use ../ as many times to reach the root directory/grandparent directory

<a href=”../../filename.html”>

20
Q

What is the purpose of an HTML form element?

A
  • The form element identifies the webpage as a form in which a user can input information
  • ex) login page, sign up form, subscription page
  • Collects information and is sent to a server
21
Q

Give five examples of form control elements.

A

Input, label, select, button, option

22
Q

Give three examples of type attribute values for HTML <input></input> elements.

A

Radio, checkbox, email, submit, time, calendar

23
Q

Is an HTML <input></input> element a block element or an inline element?

A

Inline

24
Q

What are the six primary HTML elements for creating tables?

A

Table, tr, td, th, tbody, thead, (optional: tfoot)

25
Q

What purpose do the thead and tbody elements serve? (semantic elements)

A

thead= defines a set of rows defining the head of the columns of the table.

  • Helps people who needs screen readers, improves search engine indexing, control appearance of tables better

tbody= encapsulates a set of table rows, indicating that they comprise the body of the table.

  • Helps people who use screen readers, and style the sections.
26
Q

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

A

TV schedules , stocks