2. HTML Fundamentals Flashcards
(75 cards)
In HTML, a(n) ____ indicates an element’s starting point in the document
opening tag
In HTML, a(n) ____ indicates an element’s ending point in the document
closing tag
A(n) ____ element is an element that only needs an opening tag.
void (e.g., <br>, <img>
According to WHATWG, what are the minimal parts of an HTML document?
<!DOCTYPE html>
<html>
<head>
<meta>
<title>
<body>
What HTML declaration instructs the browser about what type of document follows?
<!DOCTYPE html>
What does <html lang="en"> indicate?
That the document’s language is English
What element contains the document title, document metadata, and various other elements that are typically not displayed in the webpage
<head>
Which HTML element specifies metadata, which is data that describes the document’s data?
<meta>
What does <meta charset=”UTF-8”> mean?
It describes how characters are represented in the HTML document
Which HTML element specifies the document’s name?
<title>
Which HTML element encloses all elements and content to be rendered in the browser?
<body>
An element ____ provides additional information about the element and is included only in the opening tag.
attribute
____ 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.
Quirks, standards
Which HTML element creates a paragraph in an HTML document?
<p></p>
Which HTML element creates a line break in a paragraph, such that the content after the line break appears on a new line?
<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.
Which HTML element indicates a group of related content in a document?
<section></section>
How many levels of section headers are there in HTML?
6: <h1>, <h2>, etc.
HTML header tags should match the document’s ____ and not be selected only for their font size.
hierarchical
Which HTML element indicates emphasized text, such as text having an emphasized pronunciation when spoken, and is italicized by default?
<em></em>
Which HTML element indicates text that has strong importance, and is bolded by default?
<strong></strong>
Which HTML element denotes a title, such as a book or song title, and is italicized by default?
<cite></cite>
Which HTML element denotes important content that should be semantically highlighted and is rendered with a yellow background by default?
<mark></mark>
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?
<b></b>
Which HTML element indicates text in an alternative voice, such as a word or phrase in a foreign language, and is rendered using italics?
<i></i>
- element, indicates the ordered list's numbering scheme?
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)?
\
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?
\
48
What are the two required attributes for the
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
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?
\
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
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
|
---|