HTML Flashcards

1
Q

How do block-level elements affect the document flow?

A

Always start new line. Full width of the containing block (parent element).

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

How do inline elements affect the document flow?

A

Can share space. Capable of sharing space, but don’t always share space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
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 (stretches out to the left and right as far as it can). Width=100% Height= as much content there is. (Auto)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
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 & height = auto

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

Do not use these

A

<b>, <i>, <br></br></i></b>

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

<s> <del> <strike>
</strike></del></s>

A

<s> sale price (cross off old price)
<del> cancelled concert dates (still needs to show)
<strike> "don't use this anymore" "I have to leave this here but don't use it"
<s> replaced strike
</s></strike></del></s>

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

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

A

Ordered lists are lists where each item in the list is numbered. For example, the list might be a set of steps for
a recipe that must be performed in order, or a legal contract where each point needs to be identified by a section number.

Unordered lists are lists that begin with a bullet point (rather than characters that indicate order).

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

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

A

Block - it stacks vertically

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

What HTML tag is used to link to another website?

A

the opening
<a> tag and the closing </a> (a= anchor)

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

What is an absolute URL?

What is a relative URL?

A

When you link to a different website, the value of the href
attribute will be the full web address for the site, which is known as an absolute URL.

When linking to other pages within the same site, you can use relative URLs (my local files) begin with / or . or ..

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

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

A

Head & title element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
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
13
Q

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

A

Inside the html element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
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
15
Q

Give five examples of HTML element types

A

HTML, head, title, body, p, h1, div, etc.

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

What is the purpose of HTML attributes?

A

Attributes provide additional information about the contents of an element.

17
Q

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

A

Less-than sign
<
<
Ampersand
&
&
Copyright symbol
©
©

18
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

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

20
Q

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

A

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

21
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.)

22
Q

What is the purpose of an HTML form element?

A

Boundary to hold content that makes up that form. (this is the beginning of the form & end of the form)

23
Q

Give five examples of form control elements.

A

input, select, text area, button, option, etc.

24
Q

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

A

checkbox, button, radio, etc.

25
Q

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

A

inline

26
Q

What are the six primary HTML elements for creating tables?

A

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

27
Q

What purpose do the thead and tbody elements serve?

A

The <thead> HTML element defines a set of rows defining the head of the columns of the table.

The <tbody> HTML element encapsulates a set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>).

Easy way to identify what data goes where. Semantic value/ structural value.

28
Q

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

A

Examples of tables include financial reports, TV schedules, and sports results.