HTML Flashcards

1
Q

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

A

You would put inside the head tag element at the beginning, after the html doc type 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 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

Both child elements of HTML
Head - contains info about the page. Rather than info that is shown the main part of the browser window,
Body - everything inside this element is shown within the main browser window.
Head and Body are siblings

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 a browser which version of html this page is using

Can also help in rendering a page correctly

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

<img></img>

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

Attributes provide additional information about the contents of an element
Made up of two parts, a name and a value. Separated by an equal sign
Every HTML element has its own behavior

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 stare a new line in the browser window

Examples of block elements are h1, p, ul, li

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

Elements that will always appear to continue on the same line as their neighboring elements
a , b, em, img

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

Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”.
100% - width
Auto - height

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 (equal to the contents)
Take exactly as much space as is required/needed

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 list
Where each item in the list is numbered
Unordered list
Lists that begin with a bullet point
Rather than characters that dictate orders
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> tag element, however, you should use absolute URL when linking to another website
Anchor element
Called anchor element because it is ‘dropping anchor in a certain spot’</a>

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

What is an absolute URL?

A

Full web address
An absolute URL starts with the protocol and 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

These are like a shorthand version of absolute URLs because you do not need to specify domain name
Used to take to to pages within the same site

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

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.
music/listing.html

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
../../index.html

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

21
Q

What is the purpose of an HTML form element?

A

Used to collect information from visitors to your site

Boundary that the form control elements are meant to be within

22
Q

Give five examples of form control elements.

A
Text input
Password input
text area
Radio buttons
Check boxes - 
 Drop down boxes -
23
Q

Give three examples of type attribute values for HTML elements.

A

Type = “text” or type = “password” or type = “radio”
Name
size

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
  • used to create a table
    • indicates the start of the row
      row
  • heading should sit inside
  • body should sit inside - it is a cell within the add a header
26
Q

What purpose do the thead and tbody elements serve?

A

The HTML element defines a set of rows defining the head of the columns of the table.
encapsulates a set of table rows ( elements), indicating that they comprise the body of the table
They are structural and help with search engine optimization