HTML Flashcards

1
Q

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

A

In the “head” element. Also can add the Meta, title, and link for CSS Style 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

In 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

Nested inside of the “HTML” element. HTML is the parent and “head” and “body” will be the child element of the HTML element.

Or Some developers make the HEAD and the BODY the sibling element of the HTML element, but nested within HTML tag.

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

What is the purpose of a “!DOCTYPE html” declaration?

A

To tell a browser which version of HTML the page is 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, BODY, H1, P, SPAN

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 of 2 parts: attribute (name) and a value (key).

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

copyright © registered trademark ®

& copy ; & reg ;

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 will always appear to start on a new line in the browser window.

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

Will always appear to continue on the same line as their neighbouring 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

Default width is the full 100% width of the line and height is 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 width of the content and the height of the content: 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

The ordered list will appear in numerical order from 1, 2, 3,…
The unordered list will appear as a 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

List is a block element, will start a new 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

an opening anchor tag “a” with href (Hypertext REFerence) and a closing tag “/a”

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

What is an absolute URL?

A

The full web address for the site. Starts with the 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

doesn’t need to specify the domain and a shorthand way to tell the browser where a page is in relation to the current page. Ex. when linking to other pages within the same site, you can use relative URL.

17
Q

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

A

../ will move up to the parent directory

18
Q

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

A

./childname OR just the childname

19
Q

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

A

../../ it will move the directories up by 2

20
Q

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

A

the file name

21
Q

What is the purpose of an HTML form element?

A

Interactive control for submitting information.
An area that a user can interact with
A form refer to different elements that allow you to collect information from visitors to your site.

22
Q

Give five examples of form control elements.

A

input, action, select, option, method, id, textarea, label, button

23
Q

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

A

email, password, text, tel

24
Q

Is an HTML input 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, tr (table row), td (table data), th (table heading), thead (table header), tbody (table body), tfoot (table footer)

26
Q

What purpose do the thead and tbody elements serve?

A

tbody is the main content of the table and the thead is the heading that has the different content as the tbody

27
Q

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

A

a table of students and their grades for each of courses.

a menu from restaurant