2. HTML Fundamentals Flashcards

1
Q

In HTML, a(n) ____ indicates an element’s starting point in the document

A

opening tag

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

In HTML, a(n) ____ indicates an element’s ending point in the document

A

closing tag

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

A(n) ____ element is an element that only needs an opening tag.

A

void (e.g., <br>, <img>

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

According to WHATWG, what are the minimal parts of an HTML document?

A

<!DOCTYPE html>
<html>
<head>
<meta>
<title>
<body>

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

What HTML declaration instructs the browser about what type of document follows?

A

<!DOCTYPE html>

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

What does <html lang="en"> indicate?

A

That the document’s language is English

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

What element contains the document title, document metadata, and various other elements that are typically not displayed in the webpage

A

<head>

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

Which HTML element specifies metadata, which is data that describes the document’s data?

A

<meta>

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

What does <meta charset=”UTF-8”> mean?

A

It describes how characters are represented in the HTML document

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

Which HTML element specifies the document’s name?

A

<title>

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

Which HTML element encloses all elements and content to be rendered in the browser?

A

<body>

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

An element ____ provides additional information about the element and is included only in the opening tag.

A

attribute

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

____ mode is a browser rendering mode that renders a webpage using non-standard layout rules emulating older web browsers. A webpage with the DOCTYPE is rendered using ____ mode, which uses the HTML Living Standard.

A

Quirks, standards

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

Which HTML element creates a paragraph in an HTML document?

A

<p></p>

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

Which HTML element creates a line break in a paragraph, such that the content after the line break appears on a new line?

A

<br> (a void element)

**Use <br> when the line break is essential to the content, such as lines in a poem or mailing address, and not just to add spacing for formatting a webpage. CSS should be used for formatting a webpage.

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

Which HTML element indicates a group of related content in a document?

A

<section></section>

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

How many levels of section headers are there in HTML?

A

6: <h1>, <h2>, etc.

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

HTML header tags should match the document’s ____ and not be selected only for their font size.

A

hierarchical

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

Which HTML element indicates emphasized text, such as text having an emphasized pronunciation when spoken, and is italicized by default?

A

<em></em>

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

Which HTML element indicates text that has strong importance, and is bolded by default?

A

<strong></strong>

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

Which HTML element denotes a title, such as a book or song title, and is italicized by default?

A

<cite></cite>

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

Which HTML element denotes important content that should be semantically highlighted and is rendered with a yellow background by default?

A

<mark></mark>

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

Which HTML element indicates text that needs attention, like key words in a document abstract or product names in a review, and renders the text in bold?

A

<b></b>

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

Which HTML element indicates text in an alternative voice, such as a word or phrase in a foreign language, and is rendered using italics?

A

<i></i>

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

Which HTML element denotes text that should appear differently from normal text, such as misspelled words, and is underlined by default?

A

<u></u>

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

Which HTML element denotes a variable in a computer program?

A

<var></var>

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

Which HTML element indicates keyboard input?

A

<kbd></kbd>

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

Which HTML element indicates computer code?

A

<code></code>

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

Which HTML element indicates sample output from a computer?

A

<samp></samp>

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

How do you insert a comment in HTML?

A

<!– Comment –>

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

Which HTML element indicates an unordered list?

A

<ul></ul>

32
Q

Which HTML element indicates the list items in an ordered or unordered list?

A

<li></li>

33
Q

Which HTML element indicates an ordered list?

A

<ol></ol>

34
Q

What attribute, added to the <ol> element, indicates the ordered list’s numbering scheme?

A

type

<ol type=”1”></ol>
<ol type=”A”></ol>
<ol type=”a”></ol>
<ol type=”I”></ol> (Uppercase Roman numerals)
<ol type=”i”></ol> (Lowercase Roman numerals)

35
Q

Which CSS property provides the ability to change the bullet used in an unordered list and offers more numbering options in an ordered list?

A

list-style-type

E.g.,
<ul style=”list-style-type:square”></ul>
<ol style=”list-style-type:lower-greek”></ol>

36
Q

A list within a list item of another list is called a(n) ____ list.

A

nested

37
Q

What HTML tag creates a table that organizes data into rows and columns?

A

<table></table>

38
Q

Which HTML element indicates a table row?

A

<tr></tr>

39
Q

Which element creates a table cell containing table header information about the data?

A

<th></th>

Usually, the browser displays table headers centered with a bold font

40
Q

Which element creates a table cell containing table data?

A

<td></td>

41
Q

Which HTML element defines a short descriptive text for a table and must immediately follow the opening <table> tag?

A

<caption></caption>

42
Q

The <th> element allows for a(n) ____ attribute, which specifies whether the header applies to a “row” or a “col”

A

scope

43
Q

<td> and <th> elements can use the ____ or ____ attributes to indicate that the cell covers more than one row or more than one column

A

colspan, rowspan

44
Q

What HTML element specifies the header section in a table (not just a cell in the header section)?

A

<thead></thead>

45
Q

What HTML element specifies the body of a table?

A

<tbody></tbody>

46
Q

What HTML element specifies the table footer?

A

<tfoot></tfoot>

47
Q

What HTML element displays an image on a web page?

A

<img> (void element)

48
Q

What are the two required attributes for the <img></img> element?

A

src - specifies the URL of the image file to display

alt - provides a text description to use as an alternative to displaying the image

49
Q

An image’s ____ ratio is the ratio of the image width to the image height

A

aspect

50
Q

If an <img></img> contains only a width or only a height attribute, the image’s aspect ratio is ____.

A

maintained

51
Q

Which image format is commonly used for digital photographs?

A

JPEG

52
Q

Which image format is commonly used for line art, screenshots, or images requiring transparency?

A

PNG

53
Q

Which image format is commonly used for simple animated images?

A

GIF

54
Q

Which image format(s) use(s) lossy compression, meaning that some of the original picture information is lost when compressed?

A

JPEG

(humans cannot easily perceive the quality loss in a photograph)

55
Q

Which image format(s) use(s) lossless compression, meaning that no image quality is lost.

A

PNG and GIF

(Lossless compression works best when a large number of adjacent pixels are the same color)

56
Q

Which image format(s) can display true color (24-bit color), which is approximately 16 million different colors?

A

JPEG and PNG

57
Q

Which image format(s) is/are limited to 256 colors (8-bit color)?

A

GIF

(GIF images can display animations, which are popular on social media)

58
Q

Which image format(s) can have transparent pixels?

A

PNG

59
Q

A ____ is a small icon that identifies a website and typically displays in a browser tab.

A

favicon

60
Q

A favicon is defined with what HTML element?

A

<link>

61
Q

Which HTML element defines a hyperlink in a webpage?

A

<a></a>

62
Q

Which attribute, when added to the anchor element, specifies the hyperlink’s URL?

A

href

63
Q

How do URLs begin if they are downloading a data file over the internet?

A

ftp://

E.g., ftp://example.com/index.html

64
Q

How do URLs begin if they are opening a file from the user’s computer?

A

file://

E.g., file:///C:/example/index.html

65
Q

How do URLs begin if they are opening an email app to compose an email?

A

mailto:

E.g., mailto:person@example.com

66
Q

A(n) ____ URL is a complete URL.

A

absolute

67
Q

A(n) ____ URL specifies the path to the web resource with no scheme or hostname.

A

relative

68
Q

You can use a(n) ____ in an HTML element like <section> to allow for a URL to link to a fragment by using the hash symbol.

A

id

69
Q

An anchor element’s ____ attribute indicates how the browser should display the link when clicked.

A

target

70
Q

The ____ target attribute value in an anchor element is the default and indicates the browser will open the link in the same tab or window.

A

_self

71
Q

The ____ target attribute value in an anchor element indicates the browser will open the link in a new tab or window.

A

_blank

72
Q

A(n) ____ is a mechanism for writing special characters or symbols in HTML, such as mathematical symbols, characters in most languages, and many other symbols.

A

entity

Many HTML entities can be specified by name (e.g., ©). Others can be specified by decimal or hexadecimal number.

73
Q

The < character normally marks the beginning of a tag, so ____ is used to display the < character when < is not part of a tag

A

<

74
Q

The & character marks the beginning of an entity name, so ____ is used to display the & character when & does not start an entity name

A

&

75
Q

A ____ space looks like a single space but acts like a normal character in the middle of a word, allowing for two words to be treated as one word

A

non-breaking

The entity name for a non-breaking space is