NEW
Font size
WorksheetsHTML Quiz
Total questions: 56
Worksheet time: 28mins
What is the purpose of the <track> tag, and when should it be used?
The <track> tag is used for specifying subtitles. It is typically applied as a child of the <audio> and <video> tags.
The <track> tag is used for specifying subtitles. It is typically applied as a child of the <video> tag.
The <track> tag is used for specifying subtitles, captions, and other types of time-based text. It is typically applied as a child of the <video> tag.
The <track> tag is used for specifying subtitles, captions, and other types of time-based text. It is typically applied as a child of the <audio> and <video> tags.
What are the best examples of void elements?
<link><meta><title>
<br><base><source>
<input><br><p>
<area><embed><strong>
In HTML5, which tag or tags embed a webpage inside of a webpage?
<iframe>, <frame>, and <frameset>
<iframe>
<frame><frame>
<frame> and <frameset>
Where do <header> and <footer> tags typically occur?
as children of <body>, <article>, <aside>, and <section> tags
as children of <body>, <article>, and <section> tags
as children of <body>, <article>, <aside>, <nav>, and <section> tags
as children of <body>, <article>, <table>, and <section> tags
What is the best way to apply bold styling to text?
<strong>
Use CSS
<bold>
<b>
What is the use of the <link> tag?
when linking style sheets, JavaScript, and icons for mobile apps
when linking style sheets, favicons, and preloading assets
when linking one webpage to another
when linking style sheets, external URLs, and favicons
What should fill the two blanks in the HTML code below?
itemscope itemtype="http://schema.org/PostalAddress"
itemsref="http://schema.org/PostalAddress" itemid="address"
itemscope itemref="http://schema.org/PostalAddress"
itemid="address" itemtype="http://schema.org/PostalAddress"
What is the use of the <aside> element?
When the content can be removed without detracting from the page's message
for anything you want to move to the side, like a pull quote box, a sidebar, or an image with text wrapping around it
for anything in parentheses
for anything in a sidebar
With which tags is the <source> element associated?
<svg>, <picture>, <audio>, and <video>
<picture>, <audio>, and <video>
It is interchangeable with the src attribute, so any element that uses src may use <source>
<audio> and <video>
What is NOT a valid attribute for the <textarea> element?
readonly
max
form
spellcheck
What is the best way to code the sample shown?
What is the purpose of the <samp> element?
It connects the web browser to an SA-MP server.
It identifies enclosed text as a sampler or an example.
It identifies sample output from a computer program.
It uses a simple application messaging protocol to connect the browser to a texting device.
When should you use <ol> and <ul> elements?
Use <ul> when you want a bulleted list and <ol> when you want a numbered list.
Use <ul> when you have a list of items in which the order of the items matters. Use <ol> when you have a list of items that could go in any order.
Use <ol> when you want a bulleted list and <ul> when you want a numbered list.
Use <ol> when you have a list of items in which the order of the items matters. Use <ul> when you have a list of items that could go in any order.
What is the difference between the post and get methods in a form?
post is used for sending information to the server. get is used for retrieving form information from the server.
get is used for sending information to the server. post is used for retrieving form information from the server.
With get, data is included in the form body when sent to the server. With the post, the data goes through the URL.
With post, data is included in the form body when sent to the server. With get, the data goes though the URL.
What is the difference between the <div> and <span> tags?
<div> is used where a generic block-level tag is needed, while <span> is used where a generic inline tag is needed.
<div> is used for major divisions on a page, while <span> is used to span across columns.
<div> is the industry-standard default tag, but you could use <span> if you prefer.
<div> is used where a generic inline tag is needed, while <span> is used where a generic block-level tag is needed.
What should fill the blank in the HTML code below?
<form method="post" action="mailto:info@linkedin.com" ____="text/plain"></form>
enctype
media
type
rel
What is the correct markup for the alt attribute of an image?
<img src="cubism.jpg" alt="Version of ""Whistler's Mother"" in cubist style">
<img src="cubism.jpg" alt="Version of ""Whistler's Mother"" in cubist style">
<img src="cubism.jpg" alt='Version of "Whistler's Mother" in cubist style' />
<img src="cubism.jpg" alt="Version of \"Whistler's Mother\" in cubist style">
In the code below, what is the purpose of the id attribute?
<p id="warning">Be careful when installing this product.</p>
It establishes that id is a unique identifier in the document, used for styling CSS, scripting, and linking within a webpage.
It establishes that id is a unique identifier in the document, used for styling CSS and with Javascript code.
It establishes that id may be used for styling CSS several times per page.
It establishes that id is a unique identifier in the website, used for styling CSS, scripting, and linking within a webpage.
What is the best semantic markup for the sentence shown?
On July 21, 1969, Neil Armstrong said, "One small step for man, one giant leap for mankind."
What should fill the blank in this HTML code?
<a href="https://es.yahoo.com/" hreflang="____" target="_blank">Visita Yahoo</a>
es
es-spanish
es-es
spanish
Review the text in the red box in the image shown. What is the best way to code this in HTML?
ordered list
unordered list inside a nav element
ordered list inside a nav element
unordered list
What is the best way to code three choices within a form so that the user can select only one item?
How do you confirm that a document is written in HTML5?
The server wraps the webpage in an HTML5 wrapper.
Use the <!DOCTYPE html> declaration that starts the document.
The browser receives encoding from the server to display the document with HTML5.
It is enclosed in a <html> tag.
What does the code shown below accomplish?
It displays image1.jpg at 1000px and higher, image2.jpg at 750-999px, and image3.jpg at 749px and lower.
It displays image1.jps at 1000px and higher and image2.jpg at 750-999px, image3.jpg is a default in case <picture> is not supported.
It displays image1.jpg at 1000px and higher and image2.jpg at 750px and higher, image3.jpg is a default in case <picture> is not supported.
It displays image1.jpg, image2.jpg and image3.jpg at 1000px and higher.
What code will produce this table?
What is the <hr> tag typically used for? / Alt.: What is the semantic meaning of the <hr> tag?
This tag is depreciated (alt.: deprecated) and should not be used.
It designates a topic shift within a section at the paragraph level.
It draws a horizontal line.
It designates a shift of topic at the section level. / Alt.: It designates a separation of sections within an <article>.
What should fill the two blanks in the HTML code below?
itemprop="aggregateRating" itemref="http://schema.org/AggregateRating"
itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating"
itemid="aggregateRating" itemtype="http://schema.org/AggregateRating"
itemid="aggregateRating" itemref="http://schema.org/AggregateRating"
Which HTML snippet links back to the very top of a webpage?
Which three tags were deprecated in HTML4 but returned to HTML5?
<rb> <rp> <rt>
<acronym> <code> <wbr>
<hgroup> <q> <wbr>
<b> <i> <u>
The _ tag is used for marking up a short code snippet, while the _ tag is used for marking up a longer block of code
<kdb>, <pre>
<pre>, <code>
<kdb>, <mark>
<code>, <pre>
What does the <label> element do?
It labels webpages with important information.
It creates an ID for a corresponding input element.
It overrides the name attribute's value on a child input element.
It programmatically associates a text label with an interface element.
To get a link to open in a new window or tab, use the _ attribute
_blank
_self
_new
_parent
What is the most semantically accurate way to mark up the sentence shown below?
Note: "TLAs" stands for "three-letter acronyms."
We are fond of our TLAs in web design.
<p>We are fond of our <span title="three-letter acronyms">TLAs</span> in web design.</p>
<p>We are fond of our TLAs in web design.</p>
<p>we are fond of our <abbr title="three-letter acronyms">TLAs</abbr> in web design.</p>
<p>we are fond of our <acronym title="three-letter acronym">TLAs</acronym> in web design.</p>
What is the correctly nested markup for this list?
What should fill in the blank below?
<link href="phone.css" rel="stylesheet" _____="print" />
title
type
device
media
What is the semantically correct way to mark up this layout?
Which choice uses the correct terminology in describing this markup: <p>info</p>?
The element opener is <p>, the element closer is </p>, and the element information is info.
The start tag is <p>, the end tag is </p>, and the enclosed HTML is info.
The start tag is <p>, the end tag is </p>, and the element content is info.
The start element is <p>, the end element is </p>, and the tag content is info.
What is the difference between <input type="submit" value="click me"> and <button type="submit">Click me</button>?
There is no difference. Both will render a button that submits a form.
Both will submit a form. However, the <button> can have content other than text, like an image or nested HTML elements, while the <input> cannot.
<input type="button"> has been deprecated in HTML5. You should use the <button> tag instead.
Both will submit a form. However, the <input> can have content other than text, like an image or nested HTML elements, while the <button> cannot.
What is the best semantic way to indicate that text refers to keyboard entry?
<p>Press the <tt>Enter</tt> key to proceed.</p>
<p>Press the <kbd>Enter</kbd> key to proceed.</p>
<p>Press the <samp>Enter</samp> key to proceed.</p>
<p>Press the Enter key to proceed.</p>
What does this code do?
The browser chooses the first supported format to play with the browser's default controls.
The browser chooses the best audio format to play with JavaScript-provided controls.
The browser plays each sound file in order automatically. The user has controls to stop playback.
The browser chooses the first supported sound file and will loop the sound until the user stops it.
What attribute applies a keyboard shortcut hint to the current element?
accesskey
shortcut
keyboard
access
What is the correct way to code a link that, when clicked, will send an email to email@example.com with the subject of "Hello"?
<a href="mailto:email@example.com&subject=Hello">Click me</a>
<a href="mailto:email@example.com">Hello</a>
<a href="mailto:email@example.com?subject=Hello">Click me</a>
<a href="mailto:email@example.com?&subject=Hello">Click me</a>
Which tag is the root element of an HTML document?
<!DOCTYPE html>
<html>
<body>
<root>
Which code snippet creates the layout shown, starting at <table> and ending at </table>?
Which choice is NOT a legal value for the name attribute within a <meta> tag?
charset
viewport
generator
author
Which form is coded correctly?
What does the poster attribute do in the <video> tag?
It specifies an image that should be displayed while the video downloads and until the video is played.
It specifies an image that only displays if there is a problem with the video.
It specifies an image that should be displayed until the video is played.
It specifies an image that should be displayed while the video downloads.
What does this code do?
<audio controls src="sound.mp3" type="audio/mpeg">When does this text display?</audio>
The text displays over the audio controls unless CSS is used to position it elsewhere.
The text displays under the audio controls.
The text displays when the browser cannot play the sound.
The text never displays.
What is the primary purpose of the <canvas> tag?
It allows raster images to be rendered on the webpage.
It displays annotated images.
It allows drawing on a bitmap via JavaScript.
It allows vector images to be rendered on the webpage.
Which choice contains three valid block-level elements?
<details> <abbr> <figcaption>
<canvas> <select> <noscript>
<dt> <table> <pre>
<kbd> <p> <main>
In the code below, what is the purpose of the lang attribute?
<p lang="en-GB">Welcome to our wonderful website.</p>
It establishes the language for the website—in this case, English.
It establishes the language and dialect for the website—in this case, British English.
It establishes the language and dialect for the paragraph—in this case, British English.
It establishes the language for the paragraph—in this case, English.
Which image formats can be displayed by all web browsers?
JPG, GIF, TIF
JPG, TIF, BMP
TIF, BMP, GIF
PNG, GIF, JPG
Review the code below. What is the absolute URL for a page called page.html?
<base href="http://www.linkedin.com/dir/" />
page.html
dir/page.html
What is the correct way to include a stylesheet named style.css in the <head> of your document?
<style link="style.css">
<link rel="stylesheet" href="style.css">
<style src="style.css"></style>
<link >
You want to have single spacing in between some lines, like in a poem or an address. Which approach should you use?
Wrap the text in a box that is the right width so everything wraps correctly. Set the box width with CSS.
Separate lines with a <p>, then use CSS to make single spacing.
Use the <pre> tag to make the line spacing look exactly like you want.
Separate the lines with the <br> tag.
What does the <wbr> tag do?
t requires the browser to wrap the current line at that point.
It breaks a word into two pieces, using a hyphen to connect the words.
It formats a sentence to be easily breakable.
It presents an opportunity for a break in a very long word if needed for proper page display.
