HTML Flashcards

1
Q

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

A

Within 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

Within 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

After the doctype declaration element and within the html 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 let the browser know which version of HTML the page is formatted for

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

P, style, script, div, span

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

What is the purpose of the HTML attributes?

A

To give additional details about the content

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

Escape characters allow you to use characters normally reserved for HTML coding, such as ® 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

These elements start on a new line

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

These elements continue on the same line

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 is 100% 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

They are both auto (fill in as much space as is necessary)

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

What tags are necessary for a complete HTML skeleton?

A

Bare minimum include: <!DOCTYPE>, <HTML>, <Head>, <title>, <body></title>

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

What kind of content belongs within the <head> of an HTML document?

A

Meta information about the page (ie, <title>, <style>, <meta></meta>, <link></link>)</style></title>

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

What type of content belongs within the <body> of an HTML document?

A

Contains all of the visible contents of the page (ie, <h1>, <p>, <img></img>, <table>, <input></input>, <list>)</list>

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

Where must the DOCTYPE declaration appear in a valid HTML document?

A

At the top to tell the browser immediately what version of HTML is on that page

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

Do all HTML elements require a closing tag?

A

No, some are self-closing, like <img></img>, <input></input>, <meta></meta> because they cannot contain content like other tags, like <h1> <p>

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

What are attributes for in HTML?

A

Specify additional details about elements, and specified in the opening tag, if at all

18
Q

How do you know when to use an href attribute versus a src attribute?

A

Href is for linked resource of url (for linking things together like stylesheets or linking to specific pages with anchor elements

Src is for embedded information like css, html files, js files, images, and videos

19
Q

What is the purpose of the alt attribute on <img></img> elements?

A

Provides text description of the image, in case the image cannot load for whatever reason(s) and useful for accessibility purposes for screen-readers

20
Q

How many heading elements are available in HTML?

A

6 different levels for different sizes of headers

21
Q

How do you link to a file in the same folder as the current HTML document?

A

src=”image.png”

22
Q

How do you link to a file in a directory one level up from the directory containing the current HTML document?

A

src=”../image.png”

23
Q

What is the difference between an absolute file path and a relative file path on the web?

A

An absolute file path is the full URL to a file and a relative file path is the link according to the current page.

24
Q

What is a hyperlink?

A

HTML links are hyperlinks; you can click on them to jump around on a page or to a different page, image, or another HTML element

25
Q

What is the difference between an ordered list and an unordered list in HTML?

A

Ordered lists display their items with sequential numbers and unordered lists display their items with bullet points

26
Q

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

A

Block

27
Q

What HTML tag is used to link to another website?

A

<a></a>

28
Q

What is an absolute URL?

A

The address to an external resource

29
Q

What is a relative URL?

A

The address to a local resource

30
Q

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

A

Using ../

31
Q

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

A

Using /

32
Q

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

A

Using ../../

33
Q

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

A

Using ./

34
Q

What is the purpose of an HTML form element?

A

To act as a boundary to encapsulate the beginning to the end of the form

35
Q

Give five examples of form control elements

A

Action, method, autocomplete, name, target

36
Q

Give three examples of type attribute values for HTML <input></input> elements

A

Button, radio, checkbox

37
Q

Is an HTML <input></input> element a block element or an inline element?

A

Inline

38
Q

What are the six primary HTML elements for creating tables?

A

<table> <thead> <tbody> <tr> <td> <th>
</th></td></tr></tbody></thead></table>

39
Q

What purpose do the thead and tbody elements serve?

A

Used in long forms to separate the header table content (ie, data type) from the body table content (ie, data)

40
Q

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

A

Test scores

Prices