100+ HTML MCQs

100+HTML MCQs

More in series of HTML : Click Here

HTML Questions & Answers – Traditional HTML and XHTML

1. State whether the given statement is true or false. !DOCTYPE is case sensitive”.
a) True
b) False
Answer: b
2. Choose the correct statement.
a) In traditional XHTML close tag for some elements is optional but not encouraged
b) In traditional HTML close tag for some elements is optional but not encouraged
c) In both traditional XHTML and HTML close tag for some elements is not optional
d) In both traditional XHTML and HTML close tag for some elements is optional
Answer: b
3. Which of the following XHTML doctype declaration contains all HTML elements and attributes, including presentational and deprecated elements (like font) but not framesets?
a) !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”
b) !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”
c) !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”
d) <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
Answer: b
4. Which of the following is not a difference between HTML and XHTML?
a) Charset in html is “text/html” where as in xhtml it is “application/xml+xhtml”
b) Charset in both html and xhtml is “text/html”
c) Tags and attributes are case-insensitive in HTML but not in XHTML
d) Special characters must be escaped using character entities in XHTML unlike HTML
Answer: b
5. What indicates the content in file is HTML when delivered on the network.
a) The extension of the file “.html”
b) The “content-type” header
c) Both “.html” extension and “content-type” header
d) The “content_type” header
Answer: b
6. State whether the given statement is true or false. “We can intermix XHTML and HTML 4.01 documents”
a) True
b) False
Answer: b
7. HTML and XHTML stands for ______
a) Hyper Text Markup Language and Extensible HyperText Markup Language
b) Hyper Text Markup Language and Extensible HyperText Marking Language
c) Hyper Text Marking Language and EXtensible HyperText Marking Language
d) Hyper Text Marking Language and Extensible HyperText Markup Language
Answer: a
8. Choose the correct tag for the largest heading in HTML.
a) h6
b) heading
c) h1
d) head
Answer: c
9. Which of the following are table tags?
a) table, thead, tr, td
b) colspan, table, tr
c) table, tt, tr, td
d) thead, colspan, td, tr
Answer: a
10. Choose the correct HTML for width attribute and its value.
a) width=80
b) width=”80″
c) WIDTH=”80″
d) WIDTH=80
Answer: b

100+HTML MCQs

HTML Questions & Answers – The Rules of (X)HTML

1. Which of the following prints bold letters in traditional HTML?

i. <B>Go boldly</B>
ii. <B>Go boldly</b>
iii. <b>Go boldly</B>
iv. <b>Go boldly</b>

a) iv
b) i
c) i, ii, iii, and iv
d) both iv and i
Answer: c
2. XHTML is case insensitive and HTML is case sensitive.
a) True
b) False
Answer: b
3. What output do you expect if the following markup is rendered?

<strong>T   e    s   t   o  f  s  p  a  c  e  s</strong><br>
<strong>T e s t &nbsp;o f&nbsp; s p a c e s </strong><br>

a) T e s t o f s p a c e s
T e s t o f s p a c e s
b) Testofspaces
Testofspaces
c) T e s t o f s p a c e s
T e s t o f s p a c e s
d) T e s t o f s p a c e s T e s t o f s p a c e s
Answer: c
4. Which of the following options follows content model in HTML?

i.<ul>
     <p>Option one </p>
  </ul>
ii.<ul>
     <li>Option two </li>
  </ul>

a) i
b) ii
c) i and ii
d) Neither i nor ii
Answer: b
5. Which of the following is not an empty element?

a) <hr/>

b) <br/>

c) <p/>

d) Both <hr/> and <br/>

Answer: c
6. State true or false.

<p></p><p></p><p></p>produces numerous blank lines.

a) True
b) False
Answer: b
7. Which of the following markup is correct?

i. <b><i>is in error as tags cross</b></i>
ii. <b><i>is not since tags nest</i></b>

a) i
b) ii
c) i and ii
d) Neither i nor ii
Answer: b
8. Which of the following is not a correct (X)HTML rule?
a) Attributes should be quoted
b) Tags should not nest tag
c) Attribute minimization is forbidden
d) Unknown attributes are not ignored by the browser
Answer: d
9. Choose the incorrect escape character entity.

a) &gt;

b) &#62;

c) &lt;

d) &st;

Answer: d
10. Identify the count of mistakes in the following markup.

<html>
<head>
</head>
<body>
<li>
   <ul><p>Hello</p></ul>
</li>
<br>
<hr>
</body>
</html>

a) 2
b) 3
c) 1
d) 0
Answer: b

100+HTML MCQs

HTML Questions & Answers – Web Browsers

1. A Rendering engine is not responsible for ________
a) parsing the markup content (HTML)
b) parsing style information (CSS, XSL, and so on)
c) generating a visual presentation of the formatted content including media files referenced
d) parsing style information (CSS only)
Answer: d
2. Firefox uses _________ rendering engine.
a) WebKit
b) Gecko
c) Trident
d) Presto
Answer: b
3. State true or false. It is faster to render HTML and CSS than to interpret and execute JavaScript.
a) True
b) False
Answer: a
4. What is the use of “defer” attribute?
a) It defers rendering of html page
b) It defers script execution until the page has been rendered
c) It defers rendering of css attributes
d) It is only for internal scripts
Answer: b
5. Which of the following statements is false?
a) async and defer attributes of script tag execute before the DOMContentLoaded event
b) defer executes each script sequentially
c) async executes each script when it is ready
d) all older browsers supports async attribute
Answer: d
6. Which of the following is used to read a HTML page and render it?
a) Web browser
b) Web server
c) Web matrix
d) Web network
Answer: a
7. Which of the following is the first web browser?
a) Nexus
b) Netscape Navigator
c) Internet Explorer
d) Mosaic
Answer: a
8. Who created the first web browser
a) Tim Berners Lee
b) Jacobs, Lan
c) Marc Andeersen
d) Mozilla foundation
Answer: a
9. Nexus is first graphical web browser.
a) True
b) False
Answer: b
10. The open source software version of netscape is _________
a) Chrome
b) Mozilla
c) Internet Explorer
d) Erwise
Answer: b

100+HTML MCQs

HTML Questions & Answers – Choosing Editors and IDEs

1. Which of the following is not an IDE?
a) BlueGriffon 1.5.2
b) Aptana studio 3
c) TextEdit(Mac)
d) Dreamweaver
Answer: c

2. IDE stands for _________
a) Internet Development Environment
b) Integrated Development Environment
c) Intelligent Development Environment
d) Integrated Developed Environment
Answer: b
3. We can define ________ number of sites with one copy of dreamweaver installed on our computer.
a) 990
b) 10
c) only 1
d) unlimited
Answer: d
4. What should we add to a template in Dreamweaver in order to control where page content goes?
a) Editable Regions
b) HTML controllers
c) Frames
d) Content Controllers
Answer: a
5. Blue Griffon is based on ________ rendering engine.
a) WebKit
b) Gecko
c) Presto
d) Mecko
Answer: b
6. Swapping images in dreamweaver is best if __________
a) The images are the same “Mime” type
b) The images are the same color
c) The images are the same size
d) You use the “Constrain” tool
Answer: c
7. Choose the inappropriate option with respect to Blue Griffon 1.5.2. Blue Griffon _________
a) includes tools for developing HTML5 pages
b) abstracts out many css3 effects
c) supports direct embedding of audio and video files
d) supports swapping of videos of any length
Answer: d
8. Maqetta is an open source initiative of the Dojo Foundation to geared towards visual designers through a WYSIWYG user interface.
a) True
b) False
Answer: a
9. Choose the correct statement.
a) Exo is a cloud-based ide that offers collaboration and developed features
b) Exo does not support java and python
c) Exo does not support javascript and html5
d) Exo is a cloud-based ide that offers collaboration and deployment features & its supports javascript and html5
Answer: d
10. Which of following statement is true?
i. Cloud9 has gained particular interest for its integration with GitHub and Bit Bucket authentication integration and real-time collaboration.
ii. Cloud9 does not account for SSH and FTP access.
a) ii
b) i
c) i and ii
d) Neither i and ii
Answer: b

100+HTML MCQs

HTML Questions & Answers – Choosing Web Servers

1. Which of the following is not a web server?
a) Apache tomcat
b) BlueGriffon
c) Jetty
d) Tornado
Answer: b
2. Tomcat is an open source web server that provides a servlet container allowing you to run Java code.
a) True
b) False
Answer: a
3. Which of the following interface is not supported by LightTPD?
a) FastCGI
b) SCGI
c) GCGI
d) CGI
Answer: c
4. Which of the following is not a prepackaged server stack?
a) WAMP
b) XAAMP
c) MAMP
d) NAMP
Answer: b
5. Which of the following is not a channel of mozilla?
a) Firefox
b) Firefox alpha
c) Firefox Beta
d) Firefox Aurora
Answer: b
6. Google Chrome has its own task manager, which allows you to view and manage your memory and CPU usage.
a) True
b) False
Answer: a
7. Which of the following are automatically loaded and operates as a part of browser?
a) Add-ons
b) Plug-ins
c) Utilities
d) Widgets
Answer: b
8. Which of the following allows user to view a webpage?
a) Operating System
b) Website
c) Interpreter
d) Internet Browser
Answer: d
9. What is DOM?
a) Hierarchy of objects in ASP.NET
b) Application programming interface
c) Convention for representing and interacting with objects in html documents
d) Language dependent application programming
Answer: c
10.

<meta http-equiv="X-UA-Compatible" content="IE=8">

is used to _________

a) make web page compatible only with IE8
b) mimic behaviour of IE8
c) make web page incompatible only with IE8
d) make web page compatible with IE7 and IE8
Answer: b

100+HTML MCQs

HTML Questions & Answers – Compatibility Libraries

1. Which one of the following is an open source JavaScript library that enables styling for HTML5 elements in versions of Internet Explorer before IE 9 ?
a) HTML5
b) HTML5 Shiv
c) HTML5 Shim
d) HTML5 Sham
Answer: b
2. Which one of the following is not a step to install a library you need to perform the compatibility in browsers?
a) Download the library from the github location
b) Uncompress the file
c) Insert the following code inside the head tag
d) None of the mentioned
Answer: d
3. Which property is used to detect the browser’s user agent and code based on the pertinent cases?
a) navigator.userAgent
b) navigator.user
c) navigator
d) return
Answer: a
4. Some users have requested tests for IE’s float double margin bug, and support for position:fixed. Which API is suitable for them?
a) mq() media Plugin API
b) addTest() Plugin API
c) testAllProps() Plugin API
d) none of the mentioned
Answer: b
5. ___________ is an open source JavaScript library that allows support for different levels of experiences based on the capabilities of each browser.
a) Navigator
b) Modernizr
c) Geolocation
d) Google API
Answer: b
6. ____________ allows you to add custom styles to the document and test an element afterwards.
a) hasEvent()
b) testAllProps()
c) testProp()
d) modernizr.testStyles()
Answer: d
7. Modernizr does actually add missing functionalities to browsers save for the HTML5 tags styling support.
a) True
b) False
Answer: b
8. ___________ is used to test whether geolocation is supported in old browsers.
a) Modernizr
b) Modernizr.geolocation
c) Navigator.userAgent
d) Modernizr.js
Answer: c
9. ____________ is a resource loader (CSS and JavaScript) that was made to specifically to work side-by-side with Modernizr.
a) HasEvent()
b) Navigator.userAgent
c) Modernizr.load
d) Modernizer.geolocation
Answer: c
10. In case we want to implement a JavaScript fallback, we would need to create a conditional statement using Modernizr.
a) True
b) False
Answer: a

100+HTML MCQs

HTML Questions & Answers – Meta Data

1. Metadata store information about the web page that is not necessarily visible to end users.
a) True
b) False
Answer: a
2. In which part of the HTML metadata is contained?
a) body tag
b) html tag
c) head tag
d) title tag
Answer: c
3. Which of the following is not a function of robots meta tag?
a) noindex
b) nofollow
c) norepeat
d) noarchive
Answer: c
4. What is the role of charset attribute? It specifies
a) a scheme to be used to interpret the value of the content attribute
b) a name for the metadata
c) the character encoding for the HTML document
d) the character decoding for the HTML document
Answer: c
5. __________ prevents the page from being indexed altogether.
a) noarchive
b) nofollow
c) noindex
d) novalue
Answer: c
6. Which of the following is not supported in HTML5?
a) scheme
b) content
c) http-equiv
d) name
Answer: a
7. ___________ prevents search engines from following links inside the page.
a) noarchive
b) nofollow
c) noindex
d) novalue
Answer: b
8. Different meta tags are defined by changing the __________ attribute to a valid value.
a) scheme
b) content
c) http-equiv
d) name
Answer: d
9. __________ prevents search engines from showing a cached link for the page.
a) nobot
b) nofollow
c) noarchive
d) nosearch
Answer: c
10. The value of the ___________ attribute refers to the time interval in seconds before the refresh is performed.
a) scheme
b) content
c) http-equiv
d) name
Answer: b

100+HTML MCQs

HTML Questions & Answers – Microdata

1. __________ is an HTML specification used to add more information to HTML tags.
a) Macrodata
b) Microdata
c) Minidata
d) Modifydata
Answer: b

2. The microdata model consists of groups of name-value pairs known as ________
a) Item
b) Property
c) Value
d) URL
Answer: a
3. Every HTML element may have an ____________ attribute specified.
a) itemtype
b) relevant types
c) itemscope
d) itemref
Answer: c
4. Which of the following is true if the property value of a name-value pair added by an element with an itemprop attribute is a meta element?
a) The value is the item created by the element
b) The value is the value of the element’s value attribute, if it has one, or the empty string otherwise
c) On getting, if the element has a datetime content attribute, the IDL attribute must return that content attribute’s value
d) The value is the element’s textContent
Answer: b
5. Which of the following is true if the property value of a name-value pair added by an element with an itemprop attribute is a time element?
a) The value is the element’s datetime value
b) The value is the value of the element’s content attribute, if any, or the empty string if there is no such attribute
c) The value is the value of the element’s value attribute, if it has one, or the empty string otherwise
d) The value is the element’s textContent
Answer: a
6. The ___________ of an item is the value of its element’s itemid attribute.
a) token
b) typed item
c) global identifier
d) scope
Answer: c
7. If the element has an itemscope attribute, it returns an __________ object with all the element’s properties.
a) itemscope
b) dom object
c) collection.namedItem
d) itemtype
Answer: b
8. Which of the following is true if the property value of a name-value pair added by an element with an itemprop attribute is a data element?
a) The value is the value of the element’s value attribute if it has one, or the empty string otherwise
b) The value is the item created by the element
c) The value is the element’s datetime value
d) The value is item’s scope
Answer: a
9. Which method takes a string that contains an unordered set of unique space-separated tokens that are case-sensitive, representing types?
a) document.getItems
b) element.itemProp
c) collection.namedItem
d) object.itemref
Answer: a
10. The goal of microdata is to create a unified way to define the data in a way any web crawler or reader implementation can read it.
a) True
b) False
Answer: a

100+HTML MCQs

HTML Questions & Answers – Favicons and Icons

1. Which of the following applications/software can be used to create a favicon?
a) Unity
b) Adobe Photoshop
c) Dreamweaver
d) VLC
Answer: b
2. By default, iOS adds ____________ effects to icons.
a) reflective shine
b) square corners and reflective shine
c) rounded corners and reflective shine
d) apple trademark
Answer: c
3. Favicon stands for ______
a) Fave icon
b) Favorite icon
c) Both Fave icon and Favorite icon
d) Fav icon
Answer: c
4. Which attribute is used for favicon?
a) icon
b) title
c) rel
d) head
Answer: c
5. Which image file format is not supported in Firefox?
a) MNG
b) PNG
c) SVG
d) APNG
Answer: a
6. The favicon was standardized by the _______
a) IANA
b) W3C
c) WIPO
d) EPO
Answer: b
7. In 2003, the .ico format was registered with the ____________
a) IANA
b) W3C
c) WIPO
d) EPO
Answer: a
8. The recommended basic size for a favicon is ___________ pixels.
a) 16×16
b) 26×26
c) 48×48
d) both 16×16 and 48×48
Answer: d
9. In March 1999, Microsoft released Internet Explorer 5, which supported favicons for the first time.
a) True
b) False
Answer: a
10. A favicon is an image used by the browser to identify a website or web application.
a) True
b) False
Answer: a

100+HTML MCQs

HTML Questions & Answers – Major Themes of (X)HTML

1. Which tag is used if you want to highlight something that is important to the reader?

a) <b>

b) <strong>

c) <em>

d) <i>

Answer: a
2. Which tag is not used if you want to indicate the importance of the phrase?

a) <i>

b) <h1>

c) <em>

d) <strong>

Answer: a
3. Which of the following statement is not true?

a) XHTML DOCTYPE is mandatory

b) The xmlns attribute in <html> is mandatory

c) <html>, <head>, <title>, and <body> are mandatory

d) None of the mentioned

Answer: d
4. According to the rules of XML and XHTML, all elements must be closed either with an end tag or by self-closing with space, slash, and a right-pointing angle bracket.
a) True
b) False
Answer: a
5. __________ is the XML equivalent to strict HTML 4.01.
a) XHTML 1.0 Strict
b) XHTML 1.0 Frameset
c) XHTML 1.0 Transitional
d) XHTML 1.1 Strict
Answer: a
6. Which of the following statement is true?
a) Attribute names must be in uppercase
b) Attribute values must be quoted
c) Attribute minimization is mandatory
d) Attribute values should not be quoted
Answer: b
7. The root element of an XHTML document must be html, and must contain an __________ attribute to associate it with the XHTML namespace.
a) source

b) src
c) xmlns
d) link
Answer: c
8. Which of the following encoding an XML parser assumes?
a) UTF-8
b) UTF-16
c) UTF-32
d) Both UTF-8 and UTF-32
Answer: d
9. __________ is an extended version of the XHTML markup language for supporting RDF through a collection of attributes and processing rules in the form of well-formed XML documents.
a) XHTML + RDFa
b) XHTML+XHTML5
c) XHTML1.0+XHTML2.0
d) XHTML + RDF
Answer: a
10. XML is a markup language where documents must be marked up correctly.
a) True
b) False
Answer: a

100+HTML MCQs

HTML Questions & Answers – HTML5 Introduction – 1

1. Which feature was already introduced before HTML5?
a) Canvas/SVG
b) Video
c) Geolocation
d) Frames
Answer: d
2. Which tag is used with JavaScript?
a) <canvas>
b) <table>
c) <article>
d) <footer>
Answer: a
3. What application can one create even before the introduction of HTML5?
a) Web applications
b) Mobile applications
c) Forms
d) Browser based games
Answer: c
4. What is the correct syntax of doctype in HTML5?
a) <!doctype html>
b) <doctype html!>
c) <doctype html>
d) </doctype html>
Answer: a
5. What if one does not use the doctype in the starting of HTML document?
a) Browser finds the document in quirky mode
b) Browser finds a document in standard mode
c) Browser stops working
d) Browser crashes after showing the page
Answer: a
6. Which of the following is not semantic element for text in HTML5?
a) <mark>
b) <time>
c) <wbr>
d) <article>
Answer: d
7. Which tag supports Non-English language?
a) <input>
b) <audio>
c) <embed>
d) <bdo>
Answer: d
8. Which element was not removed by HTML5?
a) <strike>
b) <center>
c) <small>
d) <big>
Answer: c

100+HTML MCQs

HTML Questions & Answers – HTML5 Introduction – 2

1. Which of the following defines the title of a work?
a) <cite>
b) <hr>
c) <a>
d) <address>
Answer: a
2. Which element is design to wrap a single piece of information?
a) <time>
b) <nav>
c) <footer>
d) <header>
Answer: a
3. What an article element should not contain?
a) Main element
b) Text or embedded content
c) Image
d) Video & Audio
Answer: a
4. Which of the following statement is true?
a) Canvas Contains built-in animations
b) SVG needs scripts to draw elements
c) In canvas, drawing is done with pixels
d) SVG don’t support to event handlers
Answer: c
5. What does <main> include?
a) Header
b) Sidebar
c) Article
d) Footer
Answer: c
6. Which of the following is not sectioning elements?
a) <article>
b) <aside>
c) <nav>
d) <header>
Answer: d
7. How many times can HTML5 events be fired?
a) Multiple
b) One
c) Only two
d) Zero
Answer: a
8. Which element is used to get highlighted text in HTML5?
a) <highlight>
b) <b>
c) <mark>
d) <u>
Answer: c

100+HTML MCQs

HTML Questions & Answers – HTTP Overview

1. In OSI model USB lies under the layer ___________
a) data Link layer
b) physical layer
c) network layer
d) transport layer
Answer: b
2. IP is used in the level ___________
a) presentation layer
b) network layer
c) application layer
d) data Link layer
Answer: b
3. Which one is not the feature of HTTP protocol?
a) media independent
b) connectionless
c) responsive
d) stateless
Answer: c
4. Which of the following are not the valid character set in HTTP?
a) ISO-8859-1
b) US-ASCII
c) ISO-8859-7
d) ISO-8859-12
Answer: d
5. Which one is the correct syntax for specifying media type?
a) type ”/” subtype *( “;” parameter)
b) subtype ”/” type *(“;” parameter)
c) parameter “/” type *(“;” subtype)
d) (“;” subtype) “/” type *(parameter)
Answer: a
6. Which header field defines meta information?
a) Request-header
b) Response-header
c) General-header
d) Entity-header
Answer: d
7. Which of the following is not the request method?
a) Head
b) Get
c) Remove
d) Put
Answer: c
8. Which symbol is used when HTTP request does not apply to the particular source?
a) ‘&’
b) ‘*’
c) ‘#’
d) ‘@’
Answer: b
9. Which of the following is not a request-header field?
a) Expect
b) Host
c) Delete
d) If-None-Match
Answer: c
10. What does ‘3xx’ code denote?
a) Redirection
b) Server Error
c) Success
d) Informational
Answer: a

11. Which of the following is not a response-header field?
a) Location
b) Server
c) ETag
d) Referer
Answer: d

The content uploaded on this website is for reference purposes only. Please do it yourself first.