HTML Flashcards

1
Q

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

A

Non-visible content is put inside of the head element of the HTML document

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

Where do you put visible content of the HTML document?

A

Visible content is put inside of the 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

The head and body tags are put after the html tag, respectively.

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

What is the purpose of the DOCTYPE declaration?

A

The purpose of the DOCTYPE declaration is to let the browser know what version of HTML (or any language) we’re using.

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
h1 - h6
body
img
p
a
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

The purpose of HTML attributes is to provide additional info about the element that it was attached to. Adds special/unique functions to an element. To make it more specific.

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

The ampersand (&) would be &

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

Block-level elements always begin on a new line.

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

Inline elements will share the same line with other inline 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

The default width of a block-level element is all (100%) of the horizontal space of its parent element (container)
The default height is the height of its contents

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

The default width of an inline element is the space between the tags that it is within. The default height is the height of its contents.

width = auto;
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

An ordered list is numbered. An unordered list is formatted with 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

An HTML list is a block element.

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

What are the three types of HTML lists?

A

Ordered, unordered, and definition.

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

What are definition lists used for?

A

To define terminiology.

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

Can lists be nested within one another?

A

Yes.

17
Q

What element links to another website or another part of a website? What attribute must be assigned to it ?

A

the a (anchor) element

the href attribute

18
Q

What is an absolute URL?

A

The entire URL of a website. Located outside of your domain, wherever you’re working.

19
Q

What is a relative URL?

A

A URL located within the domain you’re working on. On the same computer you’re working.

20
Q

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

A

../filename

21
Q

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

A

foldername/file.name

22
Q

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

A

../../filename

23
Q

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

A

filename

24
Q

What is the purpose of an HTML form element?

A

To group together form control elements. The purpose of an HTML form element is to collect information from a user.

25
Q

Give five examples of form control elements

A
input
textarea
select
button
option
26
Q

Give three examples of type attributes values for HTML input elements

A

Text
Password
Radio

27
Q

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

A

It’s an inline element.

28
Q

How do you “link” a label element to a form element?

A

You would set the “for” attribute of the label element to the same value as the “id” element of the form element

29
Q

What are the six primary HTML elements for creating tables?

A
table
thead
th
tr
td
tbody
30
Q

What purpose do the thead and tbody elements serve?

A

They serve as semantic elements. thead will contain the headers of the table and tbody will contain the rest of the contents of the table

31
Q

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

A

Cities and their populations
Students and their grades
Transactions and their costs

The comparison of many different things.