HTML Flashcards

1
Q

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

A

Inside the head element
For meta data (data describing data)

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

Inside the body element

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

Where do theheadandbodytags go in a valid HTML document?

A

Inside the html element
head & body are children of html parent
Can also say they are nested

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

What is the purpose of a!DOCTYPEdeclaration?

A

Tell the browser which version of HTML the page is using so that the browser will render the page correctly

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

head body p span title html h1 - h6 img

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

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

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

A

> < & “ copyright, registered trademark, trademark, cent sign, multiplication/division sign, single and double quotes

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

Start on a new line and take up the entire width of the page
Stacks on top of each other

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

Has potential to share the same space on the same line as their neighboring elements

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 (container), and vertical space equal to the height of its contents, thereby creating a “block”
Width: 100%
Height: Auto

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

Only occupy the space bounced by the tags defining the element, instead of breaking the flow of the content
Width and Height: Auto

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: each item in the list is numbered
Unordered: item is bullet pointed

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
ol, ul, li

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 : a href=””

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 for the site
Starts with domain name for that site, 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

What is a relative URL?

A

Linking to other pages within the same site
Shorthand version of absolute URLs because you do not need to specify the domain name

17
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
Link to homepage from the music reviews:
a href=“../index.html”

18
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
Link to music listings from the homepage:
a href=“music/listings.html”

19
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
Link to the homepage from the DVD reviews (two files deep):
a href=“../../index.html”

20
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)
Link to music reviews from the music homepage (same directory):
a href=“review.html

21
Q

What is the purpose of an HTMLformelement?

A

Sets up boundaries for area with elements which will collect information from visitors to your site

22
Q

Give five examples of form control elements.

A

Label, Input, Select, Option, Text Area, Button

23
Q

Give three examples oftypeattribute values for HTMLinputelements.

A

“text” - creates a single-line text input
“password” - creates a text box that acts just like a single-line text input, except the characters are blocked out
“radio” - allow users to pick just one of a number of options
checkbox, file, submit, image, hidden, email, url, search, date

24
Q

Is an HTMLinputelement a block element or an inline element?

A

Inline

25
Q

What are the six primary HTML elements for creating tables?

A

table, thead, th, tbody, tr, td, (opt: tfoot)

26
Q

What purpose do thetheadandtbodyelements serve?

A

Helps distinguish between the first row and main content of the table
thead - defines a set of rows defining the head of the columns of the table
tbody - encapsulates a set of table rows indicating that they comprise the body of the table

27
Q

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

A

Sports statistics, financial information, client registry, stocks,
calendar, scientific data/research, inventory, paystubs