HTML Flashcards

(27 cards)

1
Q

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

A

head 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

body element

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

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

A

head goes at the top, body goes after head

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

What is the purpose of a !DOCTYPE declaration?

A

!DOCTYPE tells the browser which version of HTML the page is using

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

Give 5 Examples of HTML element tags

A
p
body
head
h1
title
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 additional info 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: &copy
registered: &reg
ampersand: &amp
needs to end with a semicolon

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

Will always appear on a new line

Take the entire width

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

Will always appear to continue the same line

Only take as much space as they need to

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

width is 100% (the full width)

height is equal to the height of its contents

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

inherits the height from content that surrounds

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 lists show as numbers

unordered lists show as bullet points

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 element

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

the anchor tag

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

What is an absolute URL?

A

starts with the domain name for that site and 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

links to other pages within the same site

shorthand version of absolute URLS when you don’t need to specify the domain name

17
Q

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

A

../ to indicate the folder above the current one
then follow with the file name
a href=”../index.html”

18
Q

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

A

use the name of the child folder, followers by a forward slash, then the file name
a href=”music/listings.html”

19
Q

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

A

../../
repeat the ../ to indicate you want to go up two folders then follow with file name
a href=”../../index.html

20
Q

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

A

just the file name - nothing else is needed

a href=”reviews.html”

21
Q

What is the purpose of an HTML form element?

A

allows you to collect info from visitors to your site

22
Q

Give 5 examples of form control elements.

A
input
label
select
textarea
button
23
Q

Give 3 examples of type attributes for HTML input elements.

A
  1. radio
  2. checkbox
  3. password
24
Q

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

25
What are the six primary HTML elements for creating tables?
``` table tr td th tbody thead ```
26
What purpose do tbody and thead elements serve?
help distinguish between the main content of the table and the first and last rows (which can contain different content) Browsers will usually put text in bold
27
Give Two Examples of data that would lend itself well to being displayed in a table
tv schedules | sports results