HansR on the Web - All quiz questions on HTML
Updated: 14-03-2018 23:42:08h
topics: html|forms, level: 100
What does the novalidate attribute do in the context of HTML forms?
Please select exactly one correct alternative.

Answer

The novalidate attribute is a <form> attribute. When present, novalidate specifies that form data should not be validated when submitted.
topics: html|forms, level: 100
Consider the pattern "[A-Za-z]{3}" for an input field. Which value(s) are valid according to those pattern?
Please select exactly one or more correct alternatives.

Answer

Please see the answers.
topics: html, level: 100
What best describes a self closing element?
Please select exactly one correct alternative.

Answer

An element that does not need a separate closing tag with an opening tag. A self-closing element makes use of a “/” character in order to effectively close out a beginning tag enclosed.

Example:
<br/>
topics: html, level: 100
How can you add a newline to an element's tooltip?
Please select exactly one correct alternative.

Answer

Use

Reading

No resources given.
topics: html|img, level: 100
What statement best describes the difference in purpose for the alt and title attribute for the img element?
Please select exactly one correct alternative.

Answer

The alt attribute specifies an alternate text for an ima. The "alt" text is only when the user turns off graphics or when the browser is "read out" (e.g browser for users who are visually impaired).
Image title provides additional information and follow the rules of a regular title.

Reading

HTML img Tag
topics: html|http, level: 100
What does the OPTIONS HTTP method do?
Please select exactly one correct alternative.

Answer

The HTTP OPTIONS method returns the HTTP methods that the server supports.
topics: html|forms, level: 100
Which values are valid according to this pattern?
Conside the pattern
"[A-Za-z]{3}"
for an input field.

Which values are valid according to this pattern?
Please select exactly one or more correct alternatives.

Answer

Please see the answers.
topics: html|forms, level: 100
What does the
novalidate
attribute do?
Please select exactly one correct alternative.

Answer

The novalidate attribute is a <form> attribute. When present, novalidate specifies that form data should not be validated when submitted.
topics: html|forms, level: 100
What does autocomplete do?
Please select exactly one correct alternative.

Answer

When autocomplete is on, the browser automatically complete values based on values that the user has entered before.
topics: html|forms, level: 100
What is the difference between
datetime
and
datetime-local
input types in HTML?
Please select exactly one correct alternative.

Answer

The datetime-local input type allows the user to select a date and time (no time zone).
topics: html|forms, level: 100
What are valid input types for input fields in HTML?
Please select exactly one or more correct alternatives.

Answer

date, color, range, month, week, time, datetime, datetime-local, datetime-local, email, search, tel and url Are valid input types.
topics: html|forms, level: 100
Does
min="0" max="100" step="10"
work without
min
?
Please select exactly one correct alternative.

Answer

min="0" max="100" step="10" does not work without defining min.
topics: html|form, level: 100
What does step mean as an input field restrictions in HTML?
Please select exactly one correct alternative.

Answer

step Specifies the legal number intervals for an input field.
topics: html|form, level: 100
Which are valid input field restrictions in HTML?
Please select exactly one or more correct alternatives.

Answer

step and value Are valid input restrictions.
topics: html|form, level: 100
Which are valid input field restrictions in HTML?
Please select exactly one or more correct alternatives.

Answer

pattern and required Are valid input restrictions.
topics: html,html|text,html|headings, level: 100
Which is the correct HTML tag for the largest heading in HTML?
Please select exactly one correct alternative.

Answer

<h1> is the largest header available. <h6> is much smaller. The <head> tag contains the header text of your web page and is not displayed as content. <heading> and <head> are not valid tags.

Reading

HTML Headings
topics: html|form, level: 100
Which are valid input field restrictions in HTML?
Please select exactly one or more correct alternatives.

Answer

disabled, max, maxlength, min Are all valid input restrictions.
topics: html,html|elements, level: 100
What does the body part (between
<body>
and
</body>
) of an HTML page contain?
Please select exactly one correct alternative.

Answer

The body part (between <body> and </body>) of an HTML page contains the visible part of the HTML document.

Reading

No resources given.
topics: html|http, level: 100
Which statements are correct?
Please select exactly one or more correct alternatives.

Answer

GET Requests data from a specified resource. POST Submits data to be processed to a specified resource. HEAD Is the same as GET but only returns HTTP headers and no document body. PUT Uploads a representation of the specified URI. DELETE Deletes the specified resource. OPTIONS Returns the HTTP methods that the server supports. CONNECT Converts the request connection to a transparent TCP/IP tunnel.
topics: html|http, level: 100
Which are valid HTTP requests?
Please select exactly one or more correct alternatives.

Answer

SEND is not a valid HTTP request.
topics: html|http, level: 100
Which statements are correct on HTTP POST?
Please select exactly one or more correct alternatives.

Answer

POST requests do not remain in the browser history and POST requests have no restrictions on data length.
topics: html|http, level: 100
Which statements are correct on HTTP POST?
Please select exactly one or more correct alternatives.

Answer

POST requests are never cached, POST requests do not remain in the browser history, POST requests cannot be bookmarked, POST requests have no restrictions on data length.
topics: html|http, level: 100
Which statements are correct on HTTP GET?
Please select exactly one or more correct alternatives.

Answer

GET requests have length restrictions and GET requests should be used only to retrieve data.
topics: html|http, level: 100
Which statements are correct on HTTP GET?
Please select exactly one or more correct alternatives.

Answer

All of the statements are correct.
topics: html|http, level: 100
Which statements are correct on HTTP GET and POST?
Please select exactly one or more correct alternatives.

Answer

GETRequests data from a specified resource and POST submits data to be processed to a specified resource.
topics: html|form, level: 100
Which are valid input field restrictions in HTML?
Please select exactly one or more correct alternatives.

Answer

readonly and size Are valid input restrictions.
topics: html, level: 100
Which of the following alternatives are correct?
Please select exactly one or more correct alternatives.

Answer

When using quotes in an attributes' text, you need to alternate single and double quotes to begin and end your (sub)strings.

Reading

HTML Attributes
topics: html, level: 100
What are Image Maps?
Please select exactly one correct alternative.

Answer

An Image Map defined clickable area's within an image.

Reading

HTML Images
topics: html, level: 100
Why should you always specify a width and height when using an
<img>
element?
Please select exactly one correct alternative.

Answer

If width and height are not specified, the page will flicker while the image loads. This is because the page will finalize it's layout after loading the image. Only then, the width and height are known to the browser.

Reading

HTML Images
topics: html, level: 100
In what frame is the URL opened using the following code fragment?
Please select exactly one correct alternative.

Answer

The URL is opened in a frame named "_new". However, since this looks like one of the standard target frame types (_blank, _self, _parent, _top), this is bad practice. If you want your URL to open in a frame with a name, you should give this frame a well distinguished name.

Reading

HTML Links
topics: html, level: 100
How do you put a comment in HTML?
Please select exactly one correct alternative.

Answer

Comments can be put in between <!-- and -->.

Reading

HTML Comments
topics: html, level: 100
What does "semantic importance" mean in the context of HTML?
Please select exactly one correct alternative.

Answer

Semantic HTML is the use of HTML markup to reinforce the semantics, or meaning, of the information in webpages rather than merely to define its presentation or look.
topics: html, level: 100
What is the difference between italics (
<i>
) and emphasized (
<em>
) text?
Please select exactly one correct alternative.

Answer

<em> defines emphasized text, with added semantic importance. Both <i> and <em>, however, display text in italics.
topics: html, level: 100
What does the statement
<!DOCTYPE html>
mean?
Please select exactly one or more correct alternatives.

Answer

Please see the answer above.
topics: html, level: 100
To set your background to red, which of the following code fragments can you use in your HTML5 web page?
Please select exactly one correct alternative.

Answer

In HTML%, you have to use <body style="background-color:red">. In HTML (not HTML5), you can use the older construction: <body bgcolor="#ff0000">.
topics: html, level: 100
What can you use the
<pre>
element for?
Please select exactly one or more correct alternatives.

Answer

You use the <pre> element to display text in a fixed-width font and preserve spaces and line breaks.

Reading

No resources given.
topics: html, level: 100
Which of the following statements are correct on the HTML
<head>
element?
Please select exactly one or more correct alternatives.

Answer

Please see the answer above.

Reading

HTML Headings
topics: html, level: 100
What does HTML stand for?
Please select exactly one correct alternative.

Answer

HTML stands for Hyper Text Markup Language.

Reading

No resources given.
topics: html, level: 100
What is the id attribute used for in an element?
Please select exactly one correct alternative.

Answer

id Specifies a unique identifier for an element. The "name" attribute, however, is not assumed to be unique.

Reading

HTML Attributes
topics: html, level: 100
What if the difference between cellpadding and cellspacing?
Please select exactly one correct alternative.

Answer

Cellspacing defines the distance between adjacent cells. Cellpadding defines the distance between the cellborder and it's contents.

Reading

HTML Tables
topics: html, level: 100
Between which events can you use the
DataTransfer
object to pass data?
Please select exactly one correct alternative.

Answer

Please see the answer above.

Reading

DataTransfer
topics: html, level: 100
Which of the following events is based on the drop target?
Please select exactly one correct alternative.

Answer

Please see the answer above.
topics: html, level: 100
Which of the following is NOT a value of the
draggable
attribute?
Please select exactly one correct alternative.

Answer

Auto means true for <img> but false for <div>.
topics: html,html|lists, level: 100
In HTML, what is the difference between lists using
<ul>
and lists using
<ol>
?
Please select exactly one or more correct alternatives.

Answer

Please see the answer above.

Reading

HTML Lists
topics: html,html|text,html|semantics, level: 100
Which of the following alternatives makes your text bold?
Please select exactly one or more correct alternatives.

Answer

"boldest" Is not a valid value for font-weight. Both "strong" and "em" adds so called "semantic importance" to the text. This is not specifically a style, but means that the text is "important".
topics: html,html|attributes, level: 100
What is the alt attribute used for, e.g. in an image (
img
) tag?
Please select exactly one correct alternative.

Answer

The alt attribute specifies an alternative text to be used, when an HTML element cannot be displayed.

Reading

HTML Attributes
topics: html,html|elements, level: 100
Is the following code valid?
Please select exactly one correct alternative.

Answer

Yes, <br/> is an empty element without a closing tag. If you, however, want to write strict HTML code, you should close it with </br>.

Reading

HTML Elements
topics: html|form, level: 100
With which HTML code can you accomplish the goal?
Consider the following HTML:
<body>
   <select>
      <option value="E">One</option>
      <option value="T">Two</option>
      <option value="D">Three</option>
      <option value="V">Four</option>
   </select>
</body>
    

With which HTML code can you accomplish that option "Two" is the initial chosen value when this drop-down list is displayed?
Please select exactly one correct alternative.

Answer

Please see the answer above.

Reading

No resources given.
topics: html|form, level: 100
With which of the following elements can you submit a
<form>
element?
Please select exactly one correct alternative.

Answer

Please see the answer above.

Reading

No resources given.
topics: html|form, level: 100
What will happen when the user clicks the RESET button inside the form "two" element?
Please select exactly one correct alternative.

Answer

Please see the answer above.

Reading

No resources given.
topics: html|form, level: 100
Which of the following is NOT a valid type attribute in
<input type="...">
?
Please select exactly one correct alternative.

Answer

Please see the answer above.

Reading

No resources given.
topics: html, level: 100
What is the smallest heading element used in HTML?
Please select exactly one correct alternative.

Answer

Headings are defined with the <h1> to <h6> tags.

Reading

HTML Headings
That's all folks!

Congratulations, you've made it to the end! I'll try to add more questions and topics on a regular basis.

More questions?

If you have enjoyed the quiz and you want more, you can select other tests by clicking the green buttons below.

Other resources

There are many quizzes and learning resources on the internet. Below you'll links to a selection of these. I'll add more. Quizzes from others
Learning resources
Take a look at my blog

Contact

Please contact me for feedback, suggestions and questions. hansrontheweb@live.com
Other quizzes

all topics
latest questions
html
css
javascript
jquery
bootstrap
architecture
software engineering
c#
sharepoint
xml
powershell
angular