HTML Flashcards

1
Q

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

A

Non-visible content goes in the <b>head</b> 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

Visible content goes inside the <b>body</b> element.

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

Where do the <b>head</b> and <b>body</b> tags go in a valid HTML document?

A

The <b>head</b> and <b>body</b> tags go 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 the !Doctype declaration?

A

It tells the browser what version of HTML to use.

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

What are some examples of HTML element tags?

A
HTML
Head
Body
a
title
img
p
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

They provide more information about the contents of the 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.

A

©

®

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

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

A

An ordered list is used because the list needs to be in a specific order. For example, directions for cooking.

An unordered list does not need to be in a specific order. For example, a grocery list.

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

What three HTML elements do you use to build a description list?

A

dl to assign the definition list.
dt to define the definition term.
dd to assign the definition.

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

How do block-level elements affect the document flow?

A

Block-level elements take up 100% of the width of the page and always start on a new line.

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

How do inline elements affect the document flow?

A

Inline elements only take up as much space as they need.

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

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

A
Width = 100%
Height = However much space to contain the element.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

Height and Width of an inline element are determined by the size of the element.

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

What accessibility considerations must be considered when choosing HTML elements?

A

How it will affect the screen reader and search engines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
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. Example: ../folder/file name

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

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

A

For a child folder, use the name of the child folder, followed by a forward slash, then the file name. Example: folder/file name

17
Q

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

A

Repeat the ../ to indicate the folder above the current one, then follow it with the file name. This can be used however many times is needed to climb to the correct folder. Example ../../folder/file name

18
Q

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. (Nothing else is needed) Example: file name.

19
Q

What is the purpose of an HTML form?

A

Collecting information from users as well.

20
Q

Give some examples of form control elements.

A

Input, textarea, select, option, button, fieldset, and legend.

21
Q

What are the main attributes for HTML input elements

A

type, name, value, and placeholder.

22
Q

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

A

Inline.

23
Q

What are the six primary HTML elements for creating tables?

A
table
tr= table row
td= table data
th= table heading
thead=Table head
tbody=the body of the table
tfoot=the foot of the table
24
Q

What purpose do the thead and tbody elements serve?

A

Helps with formatting.

25
Q

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

A

movie times/dates, stocks, sports results.

26
Q

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

A

selectors and declaration

property and value

27
Q

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

A

.class where class is whatever you named the class.

28
Q

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

A

use their type example h1, h2, h3 etc.

29
Q

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

A

id where id is whatever you named the id.

30
Q

What 3 attributes should the link element use and why?

A

href=specifies the path
type=should be text/css
rel=specifies relationship between HTML page and file linked to. Value should be stylesheet

31
Q

When using CSS inside the HTML file, where does it go and how do you indicate this?

A

It goes inside the head element and you use the link element.

32
Q

When using CSS in the HTML file what attributes belong in the < style > element?

A

< style type=text/css >