LinkedIn HTML Assessment Test

To get a link to open in a new window or tab, use the _____ attribute.

_new
_blank
_self
_parent

In HTML5, which tag or tags embed a webpage inside of a webpage?

<iframe>, <frame>, and <frameset>
<iframe>
<frame>
<frame> and <frameset>

In the code below, what is the purpose of defer?
<script defer src="/myscript.js"></script>

It runs the script after HTML parsing is complete.
It pauses the parsing of HTML code while the script runs.
It downloads the script from the server when resources allow.
It runs the script when it is ready.

In the code below, what is the purpose of async?
<script async src="/myscript.js"></script>

It pauses the parsing of HTML code while the script runs.
It runs the script when it is ready.
It runs the script after HTML parsing is complete.
It downloads the script from the server when resources allow.

Review the code below. What is the absolute URL for a page called page.html?
<base href="http://www.linkedin.com/dir/">

dir/page.html
page.html
http://www.linkedin.com/page.html
http://www.linkedin.com/dir/page.html

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 for the paragraph—in this case, British English.
It establishes the language for the paragraph—in this case, English.
It establishes the language for the website—in this case, British English.

What is the best way to code a comment in HTML?

<! this is a comment ->
/* this is a comment */
//this is a comment
<!-- this is a comment -->

What is the purpose of <caption>?

<caption> provides captions to <table>.
<caption> provides captions for <audio>, <video>, and <table>.
<caption> provides captions for <img>, <audio>, and <video>.
<caption> provides captions for <audio>, <video>, <img>, and <table>.

For the HTML code below, when will "Sample Text" display to the browser?
<noscript>Sample Text</noscript>

when JavaScript is not supported by the web browser
when JavaScript is disabled in the web browser
when JavaScript is not supported by the browser or if JavaScript is disabled in the browser
when there is no JavaScript used on this webpage

Which tag was NOT deprecated in HTML5?

<acronym>
<bdi>
<bgsound>
<frameset>

What does this code do?
<audio autoplay loop src="/sound.mp3" type="audio/mpeg"></audio>

The browser plays the sound automatically and continuously in the background. The user may stop the sound at any time.
When the play button is pressed, the browser will plays the sound over and over again until the user stops it.
The browser plays the sound automatically and continuously in the background. The user has no control over the sound.
The browser plays the sound once automatically in the background. The user has no control over the sound.

Which image formats can be displayed by all web browsers?

JPG, GIF, TIF
PNG, GIF, JPG
TIF, BMP, GIF
JPG, TIF, BMP

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.
It is enclosed in a <html> tag.
The browser receives encoding from the server to display the document with HTML5.

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 <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.
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. It is typically applied as a child of the <audio> and <video> tags.

What is the best semantic way to indicate that text refers to keyboard entry?

<p>Press the <kbd>Enter</kbd> key to proceed.</p>
<p>Press the <tt>Enter</tt> key to proceed.</p>
<p>Press the Enter key to proceed.</p>
<p>Press the <samp>Enter</samp> key to proceed.</p>

Which form is coded correctly?

<form>
<fieldset>
<legend>Title</legend>
<p>Your name:</p>
<input type="text" name="name" id="name">
<input type="submit" value="Submit">
</fieldset>
</form>

<form>
<fieldset>
<legend>Title</legend>
<label for="name">Your name:</label>
<input type="text" name="name" id="name">
<button type="submit">Submit</button>
</fieldset>
</form>

<form>
<legend>Title</legend>
<label for="name">Your name:</label>
<input type="text" name="name" id="name">
<input type="submit" value="Submit">
</form>

<form>
<legend>Title</legend>
<fieldset>
<label for="name">Your name:</label>
<input type="text" name="name" id="name">
<button type="submit">Submit</button>
</fieldset>
</form>

How will a video look displayed on a fully loaded webpage if the <video> tag is used and the autoplay attribute is not set?

It will display a black window unless the poster attribute is set.
It will display the first frame of the video, unless the poster attribute is set.
It will display nothing unless the poster attribute is set.
It will display a random frame from a video, unless the poster attribute is set.

Which tag is the root element of an HTML document?

<root>
<body>
<html>
<!DOCTYPE html>

What is the difference between the <head> and <header> tags?

all of these answers
There is only one <head> tag per page, while there may be many <header> tags.
The <head> tag may contain CSS and JavaScript links, while the <header> tag may contain headings and navigational links.
The <head> tag contains meta information, while the <header> tag contains navigation, logos, and other page identifying content.

Which choice is NOT a legal value for the name attribute within a <meta> tag?

generator
viewport
author
charset

Which snippet of HTML, when clicked, makes a phone call on a mobile device?

<a href="/tel">802-555-1212</a>
<a href="tel:802-555-1212">Call me</a>
<a href="/phone">802-555-1212</a>
<a href="phone:802-555-1212">Call me</a>

What is the best way to describe an empty element?

It has content but no closing tag.
It displays nothing on a website.
It has no content and no closing tag.
It has opening and closing tags but no content.

What attribute applies a keyboard shortcut hint to the current element?

access
accesskey
shortcut
keyboard

What is the best way to code three choices within a form so that the user can select multiple items?

<label><input type="checkbox" name="example"> Choice 1
</label><br/>
<label><input type="checkbox" name="example"> Choice 2</label><br/>
<label><input type="checkbox" name="example"> Choice 3</label>

<label><input type="radio" name="example"> Choice 1
</label><br/>
<label><input type="radio" name="example"> Choice 2</label><br/>
<label><input type="radio" name="example"> Choice 3</label>

<input type="radio" name="example"> Choice 1<br/>
<input type="radio" name="example"> Choice 2<br/>
<input type="radio" name="example"> Choice 3

<input type="checkbox" name="example"> Choice 1<br/>
<input type="checkbox" name="example"> Choice 2<br/>
<input type="checkbox" name="example"> Choice 3

What does the <wbr> tag do?

It formats the sentence to be easily breakable.
It presents an opportunity for a break in a very long word, if needed for proper page display.
It breaks a word into two pieces, using a hyphen to connect the words.
It requires the browser to wrap the current line at that point.

In the code below, what is target?
<a href="http://www.linkedin.com" target="_blank">Visit site</a>

an element
a tag
content
an attribute

Which is NOT a legal type attribute for the <input> tag?

<input type="color">
<input type="week">
<input type="num">
<input type="tel">

What are the best examples of void elements?

<input>
<br>
<p>

<wbr>
<base>
<source>

<link>
<meta>
<title>

<area>
<embed>
<strong>

What is the difference between the <div> and <span> tags?

<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 block-level tag is needed, while <span> is used where a generic inline tag is needed.
<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:This email address is being protected from spambots. You need JavaScript enabled to view it."; _____="text/plain" >

enctype
rel
media
type

When should you use the <aside> element?

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 a sidebar
for anything in parentheses
when the content can be removed without detracting from the page's message

With which tags is the <source> element associated?

<svg>, <picture>, <audio>, and
<video>
It is interchangeable with the src attribute, so any element which uses src may use <source> instead.
<audio> and <video>
<picture>, <audio>, and <video>

Review the text in the red box in the image shown. What is the best way to code this in HTML?

ordered list inside of a nav element
ordered list
unordered list
unordered list inside of a nav element

When should you use <ol> and <ul> elements?

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.
Use <ul> when you want a bulleted list and <ol> when you want a numbered list.
Use <ol> when you want a bulleted list and <ul> 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.

What is the purpose of the class attribute?

Classes allow CSS to select specific elements on the page. You may list as many class names within the class attribute as you wish, separated by spaces.
Classes allow CSS to select specific elements on the page. You may list only one class name per class attribute.
Classes allow CSS and JavaScript to select specific elements on the page. You may list as many class names within the class attribute as you wish, separated by spaces.
Classes allow CSS and JavaScript to select specific elements on the page. You may list only one class name per class attribute.

What is the purpose of the <canvas> tag?

displays annotated images
allows raster images to be rendered on the webpage
allows drawing on a bitmap via JavaScript
allows vector images to be rendered on the webpage

Given the file and directory structure shown here, what is the correct element to place in file profit.html to link to info.html?

<a href="/../info.html">See information</a>
<a href="/../work/info.html">See information</a>
<a href="/../../info.html">See information</a>
<a href="/info.html">See information</a>

What does the poster attribute do in the <video> tag?

It specifies an image that only displays if there is a problem with the video.
It specifies an image that should display until the video is played.
It specifies an image that should display while the video downloads and until the video is played.
It specifies an image that should display while the video downloads.

What is the difference between the post and get methods in a form?

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 post, the data goes through the URL.
post is used for sending information to the server. get is used for retrieving form information from the server.
With post, data is included in the form body when sent to the server. With get, the data goes through the URL.

What should fill the blank below?
<link href="/phone.css" rel="stylesheet" _____ ="print">

media
type
device
title

What code will produce the table shown below?

<table>
<colgroup span="2" style="background-color: yellow">
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
<tr>
<td>first</td>
<td>second</td>
<td>third</td>
</tr>
</table>

<table>
<columns colspan="2" style="background-color: yellow">
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
<tr>
<td>first</td>
<td>second</td>
<td>third</td>
</tr>
</table>

<table>
<group cols="2" style="background-color: yellow">
<tr scope="row">
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
<tr scope="row">
<td>first</td>
<td>second</td>
<td>third</td>
</tr>
</table>

<table>
<scope cols="2" style="background-color: yellow">
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
<tr>
<td>first</td>
<td>second</td>
<td>third</td>
</tr>
</table>

What is the purpose of the <samp> element?

It identifies sample output from a computer program.
It connects the web browser to a SA-MP server.
It identifies enclosed text as a sample or an example.
It uses a simple application messaging protocol to connect the browser to a texting device.

 What's 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 <acronym title="three-letter acronyms">TLAs</acronym> 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 TLAs in web design.</p>
<p>We are fond of our <span title="three-letter acronyms">TLAs</span> in web design.</p>

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 best semantic way to mark up the layout shown?

<figure>
<img src="/q24.jpg" alt="Mini-cheeseburgers.">
<figcaption>These mini cheeseburgers are served on a freshly baked pretzel bun with lettuce, tomato, avocado, and your choice of cheese.</figcaption>
</figure>

<img src="/q24.jpg" alt="Mini-cheeseburgers.">
<p>These mini cheeseburgers are served on a freshly baked pretzel bun with lettuce, tomato, avocado, and your choice of cheese.</p>

<img src="/q24.jpg" alt="Mini-cheeseburgers.">
<caption>These mini cheeseburgers are served on a freshly baked pretzel bun with lettuce, tomato, avocado, and your choice of cheese.</caption>

<figure>
<img src="/q24.jpg" alt="Mini-cheeseburgers.">
<caption>These mini cheeseburgers are served on a freshly baked pretzel bun with lettuce, tomato, avocado, and your choice of cheese.</caption>
</figure>

What does the <label> tag do?

It visually associates a text label with an interface element.
It visually labels form fields.
It programmatically associates a text label with an interface element.
It labels webpages with important information.

Which HTML snippet links back to the very top of a webpage?

<a id="top"></a> <!-- placed at the top of the page -->
<a href="#top">back to top</a>

<a href="#">back to top</a>
<a href="#top">back to top</a>

<button href="#">back to top</button>
<button href="#top">back to top</button>

<a name="top"></a> <!-- placed at the top of the page -->
<a href="#top">back to top</a>

Where do <header> and <footer> tags typically occur?

as children of <body>, <article>, <table>, and <section> tags
as children of <body>, <article>, <aside>, <nav>, and <section> tags
as children of <body>, <article>, and <section> tags
as children of <body>, <article>, <aside>, and <section> tags

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">

What should fill the blank in the HTML code below?
<a href="https://es.yahoo.com/" hreflang="_____" target="_blank">Visita Yahoo</a>

spanish
es-es
es
es-spanish

The value attribute is associated with which set of tags?

<button>
<input>
<form>

<li>
<input>
<option>

<input>
<label>
<meter>

<input>
<option>
<textarea>

What's the best way to apply bold styling to text?

<b>
<bold>
<strong>
Use CSS.

What is NOT a valid attribute for the <textarea> element?

form
readonly
spellcheck
max

What is the <hr> tag typically used for?

It designates a topic shift within a section at the paragraph level.
It designates a shift of topic at the section level.
It draws a horizontal line.
This tag is deprecated and should not be used.

What is the best way to code the sample shown?

<details>
<summary>Parmesan Deviled Eggs</summary>
<p>These delectable little bites are made with organic eggs, fresh Parmesan, and chopped pine nuts. </p>
</details>

<details>
<h4> ▶ Parmesan Deviled Eggs</h4>
<p>These delectable little bites are made with organic eggs, fresh Parmesan, and chopped pine nuts. </p>
</details>

<details open>
<summary>Parmesan Deviled Eggs</summary>
<p>These delectable little bites are made with organic eggs, fresh Parmesan, and chopped pine nuts. </p>
</details>

<h4> ▶ Parmesan Deviled Eggs</h4>
<p>These delectable little bites are made with organic eggs, fresh Parmesan, and chopped pine nuts. </p>

What is the <map> element used for?

to specify clickable areas on <img> element
to show a map to a location
to map form labels to form fields
to specify clickable areas on <img>, <svg>, or <canvas> elements

What is the difference between <input type="submit" value="click me"> and <button type="submit">Click me</button>?What is the difference between null and null?

There is no difference. Both will render a button that submits a form.There is no difference. Both will render a button that submits a form.

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.Both will submit a form. However, the null can have content other than text, like an image or nested HTML elements, while the null cannot.

The <input type="button"> has been deprecated in HTML5. You should use the <button> tag instead.The null has been deprecated in HTML5. You should use the null tag instead.

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.

Which code snippet creates the layout shown, starting at <table> and ending at </table>?
Which code snippet creates the layout shown, starting at null and ending at null?
Table with two rows. First row contains two cells with text. Second row contains one cell, also with text, the width of the two cells above.

<tr>
<td>Table cell 1</td>
<td>Table cell 2</td>
</tr>
<tr>
<td rowspan="2">Table cell 3</td>
</tr>

<tr>
<td>Table cell 1</td>
<td>Table cell 2</td>
<td>Table cell 3</td>
</tr>

<tr>
<td>Table cell 1</td>
<td>Table cell 2</td>
</tr>
<tr>
<td colspan="2">Table cell 3</td>
</tr>

<tr>
<td>Table cell 1</td>
<td>Table cell 2</td>
</tr>
<tr>
<td>Table cell 3</td>
</tr>

What does this code do? What does this code do?
<audio controls>
<source src="/sound.mp3" type="audio/mpeg">
<source src="/sound.ogg" type="audio/ogg">
<source src="/sound.wav" type="audio/wav">
</audio>

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 chooses the best audio format to play with JavaScript-provided controls.
The browser chooses the first supported sound file and will loop the sound until the user stops it.The browser chooses the first supported sound file and will loop the sound until the user stops it.
The browser plays each sound file in order automatically. The user has controls to stop playback.

LinkedIn HTML Assessment Test 2020