HTML Flashcards

1
Q

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

A

In between the head tags/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

In between the body tags/body element

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

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

A

In between the element

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

What is the purpose of a declaration?

A

To tell the browser what kind of HTML document to load

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

< p >< /p >< h1 > < /h1 >< h2 > h2 >< h3 > < /h3 >< h6> < img > h6>

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 define additional characteristics or properties of the HTML 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

& –> &
> –> >< –> <

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

They start on a new line and take up the full available 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

Do not start on a new line

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: 100% (of its parent container)
Height: Auto (fits 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

Width: Auto
Height: Auto

(width and height are dependent on the content)

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 by default. Sequential list.
And unordered list is bullet points by default. Collection of stuff.

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> (anchor element)

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

What is an absolute URL?

A

A url that contains the protocol and the domain

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 that doesn’t include the protocol or domain. Links to another place within your page (something that you have access to)

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.

ex)
< a href=”../index.html”>Home

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.

ex)
< a href=”music/listings.html”> Listings

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.

ex)
< a href=”../../index.html”>Home

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

ex)
< a href=”reviews.html” >Reviews < /a >

21
Q

What is the purpose of an HTML form element?

A

Sets up the boundaries for an area that the user can interact with

22
Q

Give five examples of form control elements.

A

input
select & option
textarea
button

23
Q

Give three examples of type attribute values for HTML elements.

A

text
image
file
submit
password
radio
checkbox

24
Q

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

A

inline element

25
Q

What are the six primary HTML elements for creating tables?

A

table
thead
tbody
tr
td
th

26
Q

What purpose do the thead and tbody elements serve?

A

thead indicates the headings of the table.
tbody indicates the body of the table.
If the table is longer than the screen, the browser will keep the header visible whilst the contents of the table scroll.

27
Q

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

A

financial reports
tv schedule
sports results
Student Grades
Class Schedule
Roster

28
Q

Which HTML meta tag is used in mobile-responsive web pages?

A

meta name=”viewport” content=”width=device-width, initial-scale=1”