HTML Flashcards

1
Q

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

A

In the head element

Meta data e.g. Title are in the 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 the body element

E.g. h1-h6, p, ul, ol, li elements

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

In the html element (head element is above the body element)

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

To tell the browser what type of document is being used

specifically with HTML it was used for which version of HTML was being used

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
h1 - h6
p
ul
ol
li
div
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

To provide additional information on the content of an element

E.g. Class, ID, src…

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
Less Than <
Greater Than >
Ampersand & 
Cent ¢ 
Pound £ 
Yen ¥ 
Euro € 
Copyright © 
Registered trademark ® 
Trademark ™ 
Multiplication × 
Division ÷
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 start on a new line. They do not allow any other elements on the same line as them.

Example Block Elements:
ul
ol
li
h1-h6
p
div
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 continue on the same line. They allow other elements to be on the same horizontal line.

Example Inline Elements:
button
span
strong
em
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: width of its containing block

Height: height of content

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: width of content

Height: height of 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 numbers each line in ascending order and an unordered list shows each item next to a bullet point.

OL:
1.
2.
3.

-
-

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 because it lists each item on its own line.

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 (the a element)

a href=”link”

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

What is an absolute URL?

A

An absolute URL is a link to a specific URL on the web (can be a completed different website [href is the full web address] )

E.g.
a href=”https://www.google.com”

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

What is a relative URL?

A

A relative URL is a link to other pages within the same site (href does not need the domain name)

E.g.
a href=”index.html”

17
Q

“What is the internet?”

A

The internet is a global network of computers that are connected to each other. Every computer on the public Internet has an IP address

18
Q

“How does the web work?”

A
  1. Your browser needs to know what a domain name means. A DNS (domain name system) lookup is performed to translate the domain name into an IP address.
  2. The browser then opens a TCP connection to the computer at the IP address.
  3. The browser then sends an HTTP request to the computer at the IP address.
  4. The browser receives a response from the computer at that IP address (originally this was an HTML document).
19
Q

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

A

WIth ../

Example:
href=”../filename”

20
Q

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

A

With the folder name / file name

Example:
href=”foldername/filename”

21
Q

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

A

You use a ,,/ for each directory you want to move up (grandparent is 2 directories above so 2 ../)

Example:
href=”../../filename”

22
Q

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

A

You can just link the file name.

Example:
href=”filename”

23
Q

What is the purpose of an HTML form element?

A

The HTML form element houses the section of the HTML document that contains interactive controls for submitting information

24
Q

Give five examples of form control elements.

A

Button
Input - the input type is noted in the type attribute
Select - used to create a dropdown selection element
option - used to provide options for the dropdown selection element
textarea - used to provide a block to input larger amounts of text in

25
Q

Give three examples of type attribute values for HTML input elements.

A
Radio - circular select button
Checkbox
text
password - text input that hides the text
submit
file
image
26
Q

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

A

It is an inline block element. Even though it puts information on the same line, because the height and width can be adjusted it gives it properties of a block element.

27
Q

What are the six primary HTML elements for creating tables?

A
Table
  thead
    tr
     th
  tbody
  td
28
Q

What purpose do the thead and tbody elements serve?

A

The thead element is used to define the row of elements at the top of the table (essentially column names) whereas the tbody element is used to define the content of the table.

29
Q

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

A

Students & Grades, Items & Pricing, Schedules, Information checkboxes