HTML Flashcards

1
Q

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

A

In the head tag element. The head element is a container for metadata (data about HTML document, which is not displayed). Ex) title, link.

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 tag element. The body element contains the entire content of a webpage. Ex) h1, p, img.

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

The head tag element should be placed between the html tag element and the body tag element. The body tag element should be placed between right after the closing head tag element and the closing html tag 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

Its purpose is to let web browsers know which version of HTML documents is using. Therefore, it helps the browser process and loads properly.

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

Give five examples of HTML element tags.

A

head, title, body, h1, p, a, 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

An attribute gives more about the content of that 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

It has a line break before and after the element and uses the full width of the page or container of its parent element.

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

It only occupies the space bounded by the tags defining the element.

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 of the block-level element is 100% and the default height is whatever height it needs to have.

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

I can’t set the width or height for the inline element because this element doesn’t start on a new line and only occupy just the width it requires.

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 have items ordered by number. The unordered list will have just 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

It’s a block-level 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

It’s a tag, href attribute.

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

What is an absolute URL?

A

It is a full URL or the entire address of the page and can be followed by the path to a specific page. If no page is specified, then the site will display the homepage.

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

What is a relative URL?

A

It’s like a shorthand version of the absolute URL that shows the current URL’s relation to the linked page’s URL. A relative URL locates a resource using an absolute URL as a starting point.

17
Q

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

A

anchor tag element, href attribute, ../ then the file name.

18
Q

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

A

anchor tag element, href attribute, name of a child folder / then the file name.

19
Q

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

A

anchor tag element, href attribute, ../ ../ then the file name.

20
Q

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

A

anchor tag element, href attribute, just file name.

21
Q

What is the purpose of an HTML form element?

A

To represent a document section containing interactive controls for submitting information.

22
Q

Give five examples of form control elements.

A

Text and password input, text area, checkboxes, drop-down boxes, radio buttons, submit buttons, file upload.

23
Q

Give three examples of type attributes for HTML input elements.

A

Input type attribute with the value of the text, radio, checkbox, image, search, submit, button, range.

24
Q

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

A

The input element is an inline element.

25
Q

What are the six primary HTML elements for creating tables?

A

Table, thead, tbody, tr (table row), th (table heading), td (table data), (tfoot) elements.

26
Q

What purpose do the thead and tbody elements serve?

A

It used to group table rows into logical sections based on their content, it allows the body element to be scrolled independently and makes it easier to apply different styles to each section of the table.

27
Q

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

A

Quantitative data, which is the result of counting or measuring, and Qualitative data, which is the result of categorizing or describing.