2. HTML Fundamentals Flashcards

(75 cards)

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
Which HTML element denotes text that should appear differently from normal text, such as misspelled words, and is underlined by default?
\
26
Which HTML element denotes a variable in a computer program?
\
27
Which HTML element indicates keyboard input?
\
28
Which HTML element indicates computer code?
\
29
Which HTML element indicates sample output from a computer?
\
30
How do you insert a comment in HTML?
\
31
Which HTML element indicates an unordered list?
\
    32
    Which HTML element indicates the list items in an ordered or unordered list?
    \
  • 33
    Which HTML element indicates an ordered list?
    \
      34
      What attribute, added to the
        element, indicates the ordered list's numbering scheme?
      type \
        \
          \
            \
              (Uppercase Roman numerals) \
                (Lowercase Roman numerals)
                35
                Which CSS property provides the ability to change the bullet used in an unordered list and offers more numbering options in an ordered list?
                list-style-type E.g., \
                  \
                    36
                    A list within a list item of another list is called a(n) ____ list.
                    nested
                    37
                    What HTML tag creates a table that organizes data into rows and columns?
                    \
                    38
                    Which HTML element indicates a table row?
                    \
                    39
                    Which element creates a table cell containing table header information about the data?
                    \ Usually, the browser displays table headers centered with a bold font
                    40
                    Which element creates a table cell containing table data?
                    \
                    41
                    Which HTML element defines a short descriptive text for a table and must immediately follow the opening tag?
                    \
                    42
                    The
                    45
                    What HTML element specifies the body of a table?
                    \
                    46
                    What HTML element specifies the table footer?
                    \
                    47
                    What HTML element displays an image on a web page?
                    \ (void element)
                    48
                    What are the two required attributes for the element?
                    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
                    An image's ____ ratio is the ratio of the image width to the image height
                    aspect
                    50
                    If an contains only a width or only a height attribute, the image's aspect ratio is ____.
                    maintained
                    51
                    Which image format is commonly used for digital photographs?
                    JPEG
                    52
                    Which image format is commonly used for line art, screenshots, or images requiring transparency?
                    PNG
                    53
                    Which image format is commonly used for simple animated images?
                    GIF
                    54
                    Which image format(s) use(s) lossy compression, meaning that some of the original picture information is lost when compressed?
                    JPEG (humans cannot easily perceive the quality loss in a photograph)
                    55
                    Which image format(s) use(s) lossless compression, meaning that no image quality is lost.
                    PNG and GIF (Lossless compression works best when a large number of adjacent pixels are the same color)
                    56
                    Which image format(s) can display true color (24-bit color), which is approximately 16 million different colors?
                    JPEG and PNG
                    57
                    Which image format(s) is/are limited to 256 colors (8-bit color)?
                    GIF (GIF images can display animations, which are popular on social media)
                    58
                    Which image format(s) can have transparent pixels?
                    PNG
                    59
                    A ____ is a small icon that identifies a website and typically displays in a browser tab.
                    favicon
                    60
                    A favicon is defined with what HTML element?
                    \
                    61
                    Which HTML element defines a hyperlink in a webpage?
                    \
                    62
                    Which attribute, when added to the anchor element, specifies the hyperlink's URL?
                    href
                    63
                    How do URLs begin if they are downloading a data file over the internet?
                    ftp:// E.g., ftp://example.com/index.html
                    64
                    How do URLs begin if they are opening a file from the user's computer?
                    file:// E.g., file:///C:/example/index.html
                    65
                    How do URLs begin if they are opening an email app to compose an email?
                    mailto: E.g., mailto:person@example.com
                    66
                    A(n) ____ URL is a complete URL.
                    absolute
                    67
                    A(n) ____ URL specifies the path to the web resource with no scheme or hostname.
                    relative
                    68
                    You can use a(n) ____ in an HTML element like
                    to allow for a URL to link to a fragment by using the hash symbol.
                    id
                    69
                    An anchor element's ____ attribute indicates how the browser should display the link when clicked.
                    target
                    70
                    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.
                    _self
                    71
                    The ____ target attribute value in an anchor element indicates the browser will open the link in a new tab or window.
                    _blank
                    72
                    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.
                    entity Many HTML entities can be specified by name (e.g., ©). Others can be specified by decimal or hexadecimal number.
                    73
                    The < character normally marks the beginning of a tag, so ____ is used to display the < character when < is not part of a tag
                    <
                    74
                    The & character marks the beginning of an entity name, so ____ is used to display the & character when & does not start an entity name
                    &
                    75
                    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
                    non-breaking The entity name for a non-breaking space is
                    element allows for a(n) ____ attribute, which specifies whether the header applies to a "row" or a "col"
                    scope
                    43
                    \
                    and \ elements can use the ____ or ____ attributes to indicate that the cell covers more than one row or more than one column
                    colspan, rowspan
                    44
                    What HTML element specifies the header section in a table (not just a cell in the header section)?
                    \