HTML Flashcards

1
Q

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

A

head tag

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

Where do you put the visible content of the HTML document?

A

body tag

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

What is the purpose of a declaration?

A

to tell a browser which version of HTML is being used

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

Give five examples of HTML element types.

A

head, body, img, div, h1-6, p, a, span…

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

What is the purpose of HTML attributes?

A

they tell us more about the content of the html element to which they are assigned

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

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

A

&_amp; = &
&_copy; = copyright symbol
&_reg; = registered trademark
&_trade; = TM trademark

[without the _ ]

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

How do block-level elements affect the document flow?

A

– structure of the page
– they always start a new line in the window
– a new chunk of info to display
– headers, paragraphs, lists, etc
Examples of block elements are h1, p, ul, li

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

How do inline elements affect the document flow?

A

– semantic info, emphasis
– continue on the same line as neighbouring elements
– modify/effect small parts of a larger whole
– italicize, bolden, quote, links, line breaks, etc

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

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

A

– one line high and as wide as can be
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).

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 an inline element?

A

– one line high and only as wide as needed
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
11
Q

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

A

– ordered is sequentially numbered (ie: instruction steps) (ol, li)
– unordered is a general bullet-pointed list (ie: grocery list) (ul, li)
– definition lists is to define terminology (dl, dt, dd)

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

What HTML tag is used to link to another website?

A

– a, anchor tag
a href=”url”>link description text a

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

What is an absolute URL?

A

the full web address for an external site/link

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

What is a relative URL?

A

links to local pages/content within the same site

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

A

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

a href=”../index.html”>Home

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

a href=”folder/listings”>Listings /a

18
Q

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

A

Use the name of the child folder, followed by a
forward slash, then the name of the grandchild
folder, followed by another forward slash, then the
file name.

a href=”movies/dvd/reviews.html”>Reviews a

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

a href=”reviews.html”>Reviews

20
Q

How do you open links into new tabs?

A

Use the target attribute with the value “_blank”.

21
Q

What is the purpose of an HTML form element?

A

– to collect information from the user

The element represents a document section containing interactive controls for submitting information.

22
Q

Give five examples of control elements.

A

input, label, select, textarea, fieldset, legend, button, dataset, output, option, optgroup

23
Q

Give three examples of type attribute values for HTML elements.

A

– type=”text : for text field
– type=”password” : for hidden pw input
– type=”checkbox” : for selecting one or more options
– button, color, date, email, file, image, range, etc…

24
Q

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

A

inline

25
Q

What are the six primary HTML elements for creating tables?

A

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

26
Q

What purpose do the thead and tbody elements serve?

A

– thead stores the table headings

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

– tbody stores the body of the table

The tbody element encapsulates the table rows elements, indicating that they comprise the body of the table.

– tfoot is used for lengthy tables that extend several page, encloses the table so the thead content will show as you scroll.

27
Q

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

A

grades, scores, financial reports, schedules