HTML Flashcards

1
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 (eg: steps for a recipe that must be performed in order)
  • unordered lists are lists that begin with a bullet point (rather than characters that indicate an order of things)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

a block element

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

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

A

head element (for instance, users cant see meta tags on a web page)

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

Where do you put visible content about the HTML document?

A

body element

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

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

A

in the body element

head and body elements are siblings of each other

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

Give five examples of HTML element tags

A

img, h1, body, main, div

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

What is the purpose of HTML attributes?

A

to tell us more about the element

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

Give an example of an HTML entity (escape character)

A

& c o p y ;

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
  • they take up the full width available
  • start on a new line
  • has top and bottom margin
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
  • they take up as much width as necessary

- don’t start on a new line

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

height: takes up as much height as necessary
width: 100%

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: takes up as much width as necessary
width: takes up as much width as necessary

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

a tag / anchor tag

users can click on anything in between the opening <a> tag and the closing </a> tag (the text users click on is known as a link text)

you specify which page you want to link to using the href attribute

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

What is an absolute URL?

A

a link to a different website where the href attribute is the full web address for the site

an absolute URL includes an https protocol

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

What is a relative URL?

A

a link to other pages within the same site and you can locate it by calling its folder and or file

17
Q

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

A

../ to indicate the folder above the current one and follow it with the file name

from relative link to home page (parent directory): ../index.html

18
Q

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

A

use the name of the child folder followed by a forward slash and then the file name

from relative link (eg. home page) to music listings (child directory): music/listings.html

19
Q

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

A

use ../ twice to indicate that you want to go up two folders then follow it with the file name

from relative link (eg. DVD reviews) to home page (grandparent folder): ../../index.html

20
Q

How do you indicate the relative link to the same directory?

A

use the file name

to link from relative link or music homepage to music reviews: reviews.html

21
Q

What is the purpose of an HTML form element?

A

to collect information from users

22
Q

Give five examples of form control elements.

A

text input, password input, text area, radio button, checkbox, drop-down list box, multiple select box, submit button, etc..

23
Q

Give three examples of type attributes for HTML elements.

A

text, password, submit

24
Q

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

A

inline

25
Q

What are the six primary HTML elements for creating tables?

A
table row
table data
table heading
tbody
thead
26
Q

What purpose do the thead and tbody elements serve?

A

to distinguish between the main content of the table and the headings of the table

27
Q

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

A

movie schedules and financial reports