Web Development C779 - HTML5 Coding
What tag is used for specifying HTML character sets?
<meta charset="UTF-8">
What is the <em> tag for?
For emphasis
What is an attribute?
Specifies a quality or describes a certain aspect of the element.
What is the script tag element?
tells the browser to load a JavaScript file
What is the difference between the <head> and <header> tag?
- <header> is used to wrap headers in the content - <head> is part of the HTML document that's never displayed to users
What year was Unicode created?
1991
Does the <img> tag require a closing tag?
No, it is self-closing
What are the two types of lists in HTML?
Ordered list <ol> and Unordered list <ul>
What is an empty tag?
Tags that stand alone.
Which element should you use inside of the <head> element to identify that page when it's bookmarked?
The <title> element provides the bookmark information.
How does the browser know what information to present when it loads a web page?
The browser parses an HTML document, which may also include links to other resources, which the browser then downloads and presents.
What is the <p> element and what does it do?
The paragraph element creates an area on a page, rather than a portion of a line.
When deciding which headline level to use (h1, h2, h3, h4, h5, h6) which of these statements is true?
We should use the level of headline that makes sense, based on the semantic meaning of content.
What are three attributes of the <meta> tag?
- charset - content - name
Which of these attributes is NOT a global attribute?
datetime
What is the <blockquote> element for?
for when you want something bigger, to really stand out.
What's a true statement about the difference between the <blockquote> element and the <q> element?
<blockquote> is a block-level element, while the <q> element is inline, nested inside another block-level element.
What generic elements were used to separate content on a web page before HTML5?
<div> and <span>
What would a link tag to a style sheet look like?
<link href="main.css" rel="stylesheet">
Which meta tag attribute is used to provide a website description that will show up on search engines?
<meta name="description" content="A description of this site that will show up in search engine results.">
The meta tag needed for a responsive web page?
<meta name="viewport" content="width=device-width, initial-scale=1">
Which type of element is typically a block?
<p>
How does a user gain access to the debugging features of a browser?
by accessing developer tools
What is the <head> element in an HTML document?
contains information the browser needs to know, though it wont be displayed on the page
How many heading levels are there?
6
Which syntax can we use to add comments to our HTML?
<!-- comment -->
What do container tags consist of?
Starting and Ending(Closing) tags
Define: Empty tag
Tags that do not directly format a specified block of text, and therefore one tag can execute the instruction.
What are HTML elements used for?
Used to provide content and attributes to a Web page
How many elements are there in the following HTML code? <h1> The End of the World is Nigh </h1> <article> Musings on our Current Social Predicament, by <em> Trans I. Tory </em> <p> Random content....</p> </article>
four
How do we use HTML elements in combination with each other? - <p>Here's some text that <em>should be emphasized.</p></em> - <p>Here's some text that </em>should be emphasized.</p></em> - <p>Here's some text that <em>should</em> be emphasized.</p> - <p>Here's some text that</p> <em>should</em> <p>be emphasized.</p>
- <p>Here's some text that <em>should</em> be emphasized.</p>
A tag can consist of what three items inside the angle brackets?
1. element 2. attribute 3. value
What is the proper format for inserting a comment in an HTML document?
<!-- Comment goes here -->
What is the charset attribute?
Defines the alphabet or set of characters for the script language
What is a text-level element?
Elements that can affect something as small as a character or a word
True or False - Lists cannot be used to mark up navigation.
False list can be used to mark up navigation
What is the <kbd> tag for?
For user keyboard text to be typed
What is the <dfn> tag for?
For word definitions
What is an attribute value?
Gives value to the element and its attribute
What is a block-level element?
Markup elements that affect an entire paragraph or multiple paragraphs
Why is it important to remember to use closing tags?
so it is clear where elements end
What is a container tag?
tags that come in pairs. Tags that use starting and ending tags.
What is the <pre> element used for?
used for listings where line breaks and other white space need to be preserved
What are the <em> and <strong> tags used for?
used to convey a sense of importance or stress when spoken.
What are the 6 major elements of a <body> container element?
- <main> - wraps around the main content of the page - <header> - used to mark places on a page where content is a header - <footer> - used to mark places on a page where content is a footer - <article> - a unit of standalone content - <section> - marks segments of content - <aside> - marks content that is off to the side or not the main attraction
What are the six major sectioning elements that typically go directly in the <body> element?
<aside>, <main>, <article>, <header>, <footer>, <section>
What is the <code> tag for?
For program code examples
What is the <var> tag for?
For variable text in a program code
What is the largest heading level?
H1
What is the <body> element?
contains the information and content that will be displayed on the page
Where can you find the authoritative standard for HTML?
the Living Standard
Which section of an HTML page should contain metadata?
the head
What is the character entity for the greater-than symbol (>)?
>
What is the character entity for the less-than symbol (<)?
<
How can you mark a quotation as being in a different language from its surrounding text?
Create a <blockquote> element with a lang attribute indicating the language for its contents.
What is the <samp> tag for?
For program sample output
Do empty elements require a closing tag?
No
What is the <q> element good for?
great to use inside of a paragraph or other block-level element
What does proper nesting of html elements mean?
means that you must open and close a pair of tags within another pair.
What is the <strong> element meant to be used for?
meant for importance.
What does the dir attribute do?
specifies the flow/direction of reading "ltr" or "rtl"
What is the <aside> element good for?
appropriate for footnotes or diversions from the main topic.
Inline command for a non-line-breaking space?
&nbps;
What is Unicode?
A universal encoding standard for characters encompassing many languages
What is the <strong> tag for?
For bolder text
What visual element changes between each heading level?
Size
What does the lang attribute do?
Specifies supported languages of a web page
What is an unordered list <ul>?
a bulleted list
Which elements are used to mark-up code on screen?
<pre> and <code>
When we want to convey importance, seriousness, or urgency, which element do we use?
<strong>
Which two elements are used to mark-up subscript and superscript text?
<sub> and <sup>
Which element is used within the <head> container element to display a page title for the web browser tab?
<title></title>
What does a block-level element always do?
Always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).
What is ASCII?
An encoding standard limited to 128 character, focused on the needs of certain European languages
How does the id attribute differ from the class attribute?
An id attribute name may only be used once in a document.
How does the break tag differ from most other inline and block tags?
It does not require a closing tag.
What is the purpose of the DOCTYPE declaration?
It informs the interpreter (usually a Web browser) what version of HTML the Web page is written in
Which is a true statement about HTML lists?
Lists can be used to mark up navigation.
Is the datetime attribute a global attribute?
No - The datetime attribute is only used on the <time> element, as a way to create a machine-readable date.
What is the href attribute?
Provides the URL to an asset
What is an element?
Provides the main instruction of the tag. Required for every tag.
What is a the rel attribute used for?
Tells the browser which kind of asset it is
What is the difference between a head element and a header element?
The <head> element contains document metadata, and a <header> element contains text to be displayed.
Which type of tag would you not find in the document head?
The <p> tag is used almost exclusively in the body.
True or False - A header can be used inside articles and sections.
True
True or False - A single HTML document is the foundation for everything else that gets loaded and displayed.
True
True or False - Elements should have an opening and closing tag, unless they're empty elements which don't need the closing tag.
True
True or False - Even when you're presenting a date, you should use the <time> element, with the datetime attribute specifying the formal date.
True
True or False - If something is broken, ARIA can be a way to fix it.
True
True or False - The data in the head section is essential but not displayed.
True
True or False - The head element is a document-wide specification, and headers can occur at several locations within the body.
True
Is dir a global attribute?
Yes
Is the lang attribute a universal attribute?
Yes; can be used in any element
What is an unordered list and what is the tag used?
a bulleted list using the <ul> tag
What is an ordered list <ol>?
a numbered list
What is an ordered list and what is the tag used?
a numbered list using the <ol> tag.
In the tag below, what do we call "datetime"? <time datetime="2024-03-07"> March, 7, 2024</time>
an attribute
Is <span> a block-level element or inline element?
inline-element
What is the link element?
links to a range of other assets we want to load
What entity publishes the authoritative document for HTML standards, the Living Standard?
published by WHATWG.
Why do you need to specify the desired language for HTML content?
so correct dictionaries and pronunciations are used
What is the <code> element used for?
used to mark-up code onscreen for short snippets inside of other content.
Within which container element does the <meta charset="UTF-8"> HTML character specification belong?
<head></head>
What is the difference between the usage of <div> and <span>?
<div> is used for blocks, and <span> is used for a part of a line.
Which elements are used to convey meaning, instead of just typesetting convention?
<em> and <strong>
What are some examples of text-level elements?
<em>, <strong>, <dfn>, <code>, <kbd>, <samp>
Within which container element tag does the lang attribute go in?
<html></html>
Which tag preserves the spaces, tabs, and line breaks within a piece of text so a poem or piece of code can be presented faithfully?
<pre> tag
Which markup is correct? A) <date time="2025-10-08">October 8, 2025</date> B) <date>October 8, 2025</date> C) <datetime time="2025-10-08">Octber 8, 2025</datetime> D) <time datetime="2025-10-08"October 8, 2025</time>
D) <time datetime="2025-10-08">October 8, 2025</time>
Which code would you use to guarantee that the words "Hocus Pocus" are not split by a line break after "Hocus"?
Hocus Pocus
What is an HTML Element and what are they used for?
Specific components of an HTML document that can provide content and attributes to a Web page.
What are the best uses for HTML's div and span elements?
To group elements, or mark text within an element.
When should we use an ARIA attribute?
any time the existing markup makes things confusing in the accessibility tree
In HTML, when would you use a character entity such as ?
any time you want characters to appear as simple text instead of being parsed as code
Is <div> a block-level element or inline element?
block-level
Which HTML element has the correct structure? a) <h1> The Headline b) <h1>The Headline<h1> c) <h1>The Headline</h1> d) </h1>The Headline</h1>
c) <h1>The Headline</h1>
Besides visual appearance, what is most important about headline levels?
creating an organizational hierarchy
What does the <pre> tag do?
preserves formatting.
What sort of efforts require the use and understanding of ARIA attributes?
those involving accessibility issues; It may be essential to functionality that all users can access specific content.
What is ARIA used for?
used to clarify to the accessibility tree what is happening with a particular element, set of elements, or interface