HTML Flashcards

1
Q

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

A

Non-visible content goes in the head. meta,title etc etc

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 contains all the visible content the viewport will see

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

They go inside of the html tags and are it’s children (with head and body themselves being sibilings.

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

The doctype declaration is literally telling the browser which html it’s 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

head, html, div, body, span, p etc etc A TON of html elements exist. Most noteworthy thing is that DOCTYPE is a declaration and specifically not an element

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 can both modify an element further and provide additional information and context for an element. Most notably they will always contain a NAME and VALUE

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

An example of an entity could be < being < All entities begin with & and end with ; If known they can be much more efficient then looking up a symbol could be. As well as writing a symbol that html already has a special purpose for.

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 newline and create space on the next line after it is finished.

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

They affect the document much less, as they do not force line breaks.

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 is 100% because it always takes up the maximum horizontally space wise. Vertically they are auto, and take as much space as necessary.

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

Inline elements width and height wise are auto. They by design take up the minimum space necessary.

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 number things like 1, 2, 3 etc as unordered lists will do something like 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

ul and ol and even li are all elements that are block elements.

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

What are the six primary HTML elements for creating tables?

A

table, thead, tbody, td, tr, th

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

What purpose do the thead and tbody elements serve?

A

thead is the heading, the tbody contains the data

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

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

A

stocks, calculating a budget

17
Q

What HTML tag is used to link to another website?

A

The anchor element <a> tag is used to link to another website</a>

18
Q

What is an absolute URL?

A

An absolute URL is when you use the whole URL as a link. This is often only used when going to somewhere outside of your own webpage.

19
Q

What is a relative URL?

A

When using relative url, if all of the files are in the same folder. Then the value is just the filename.

20
Q

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

A

Use the ../ to indicate going one directory above.

21
Q

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

A

use the filename/file.html or whatever the file type is.

22
Q

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

A

You use the ../../ to go to the grand parent directory. Note you basically just repeat ../ to go two directories up instead of one. Can repeat as many times as necessary

23
Q

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

A

You just write out the filename. It should just be right there.

24
Q

What is the purpose of the HTML form element

A

Creates a boundary that around all the types of control elements. It generally wants to just be surrounding all your inputs. Proper syntax means it’ll always contain all the interactive elements of your document.

25
Q

Give five examples of form control elements.

A

Select, input, textarea, label, form, button.

26
Q

Give three examples of type attribute values for HTML elements.

A

radio, search, submit

27
Q

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

A

input is an inline element