HTML MCQ
HTML MCQ
5. Which of the following is used to read an HTML page and render it?
a) Web server
b) Web network
c) Web browser
d) Web matrix
View Answer
Answer: c
Explanation: A web browser (commonly referred to as a browser) is a software application
for retrieving, presenting and traversing information resources on the World Wide Web. A
web server process, store and display output to the client as per their request. Web matrix
is a discontinued cloud-connected website builder and HTML editor for Windows.
advertisement
6. Which of the following is not a difference between HTML and XHTML?
a) Charset in both html and xhtml is “text/html”
b) Tags and attributes are case-insensitive in HTML but not in XHTML
c) Special characters must be escaped using character entities in XHTML unlike HTML
d) Charset in html is “text/html” where as in xhtml it is “application/xml+xhtml”
View Answer
Answer: a
Explanation: HTML is case insensitive while XHTML is case sensitive. In XHTML, special
characters can be escaped using character entites but not in HTML. Charset in HTML is
“text/html” where as it is “application/xml+xhtml” for XHTML.
7. Which of the following tag is used for inserting the largest heading in HTML?
a) head
b) <h1>
c) <h6>
d) heading
View Answer
Answer: b
Explanation: Headings in HTML starts from <h1> to <h6> in which <h1> heading is the
largest one and <h6> is smallest one among those. The heading tags are <h1> <h2> <h3>
<h4> <h5> and <h6> that are used for the creations of headings.
13. Which of the following elements in HTML5 defines video or movie content?
a) <video>
b) <movie>
c) <audio>
d) <media>
View Answer
Answer: a
Explanation: The media to which linked document is optimized is given by <media> tag.
Before HTML5, videos could only be played with a plug-in (like flash). The HTML5 video
element specifies a standard way to embed a video in a webpage. As like <video>
elements, <audio> element contains additional files or streams like music, recording, etc.
14. Which of the following is not the element associated with the HTML table layout?
a) alignment
b) color
c) size
d) spanning
View Answer
Answer: b
Explanation: There are three elements in HTML table layout i.e. size, spanning and
alignment. Layout type can be achieved by setting Rows elements layout attribute to Fixed
or Auto. Auto attribute relies on browser compatibility whereas fixed layout relies on
developer specification.
16. Which HTML tag is used for making character appearance bold?
a) <u>content</u>
b) <b>content</b>
c) <br>content</br>
d) <i>content</i>
View Answer
Answer: b
Explanation: By enclosing words in the tags <b>and</b> we can make characters appear
bold. <i> element is for content in italics, <u> is for underlined content, <br> is for vertical
breaking.
20. Which of the following HTML code will make an image clickable?
a)
b)
<img src="https://www.sanfoundry.com/sanfoundry-logo">
<a href="https://www.sanfoundry.com/">Sanfoundry Home Page</a>
</img>
c)
d)
<a href="https://www.sanfoundry.com/"><img
src="https://www.sanfoundry.com/sanfoundry-logo" /></a>
View Answer
Answer: d
Explanation: <a> tag defines a hyperlink, which is used to link from one page to another
page. Suppose if we want an image to be clickable then it should go inside <a> Tag.
22. In HTML, which attribute is used to create a link that opens in a new window tab?
a) src=”_blank”
b) alt=”_blank”
c) target=”_self”
d) target=”_blank”
View Answer
Answer: d
Explanation: Add the target=”_blank” attribute in the Anchor tag. target=”_blank” attribute
makes a link open in a new window tab.
24. Which of the following HTML tag is used to create an unordered list?
a) <ol>
b) <ul>
c) <li>
d) <ll>
View Answer
Answer: b
Explanation: <ul> tag is used to create the unordered list items in an HTML document. By
default, unordered list items will display in a bulleted format.
Different types of unordered list Attribute Values are:
Disc
Circle
Square
None
Syntax: <ul> Unordered List Items </ul>
26. Which of the following HTML tag is used to add a row in a table?
a) <th>
b) <td>
c) <tr>
d) <tt>
View Answer
Answer: c
Explanation: In HTML, <tr> tag is used to create a row in the table. <th> tag is used to set
the header cell of a table.
Output:
Sanfoundry
28. Which of the following tag is used to create a text area in HTML Form?
a) <textarea> </textarea>
b) <text></text>
c) <input type=”text” />
d) <input type=”textarea” />
View Answer
Answer: a
Explanation: The text area tag (<textarea>) is used in a form to declare a text area element.
It allows the user to enter text in multiple rows.
29. To show deleted text, which HTML element is used?
a) <del>
b) <em>
c) <strong>
d) <ins>
View Answer
Answer: a
Explanation: <strong> element shows the importance of text/paragraph between it’s tags.
<em> element indicates emphasis, browser will show the contents of <em> element in italic.
<ins> element shows the content that has been inserted, usually it has underline. <del>
element shows text that has been deleted from, usually it has a line through the content.
<p>This is <del>not</del> for deletion </p>
b)
c)
d)
<a>https://www.sanfoundry.com/1000-html-questions-answers/</a>
View Answer
Answer: a
Explanation: An anchor tag (<a>) and href attribute are used to create a hyperlink in HTML.
37. Which HTML tag is used to convert the plain text into italic format?
a) <b>
b) <p>
c) <i>
d) <a>
View Answer
Answer: c
Explanation: In HTML, <i> tag is used to convert the plain text into italic format.
43. Which of the following is an HTML specification used to add more information to HTML
tags?
a) Modifydata
b) Minidata
c) Macrodata
d) Microdata
View Answer
Answer: d
Explanation: The Microdata spec provides a standardized syntax for additional semantic
markup to your web pages to enhance the machine readability of your web pages. The
planning for distribution center operation is offered by minidata. Macrodata and Modifydata
are not any terms related to HTML5.
45. Which of the following HTML element is used for canvas graphics?
a) <css>
b) <paint>
c) <canvas>
d) <graphic>
View Answer
Answer: c
Explanation: CSS i.e. Cascading Style Sheet is a scripting language. Canvas graphics are
introduced in HTML5. Element used for canvas graphics is <canvas>. The HTML canvas
element is used to draw graphics, on the fly, via scripting (usually JavaScript).
1.
State whether the given statement is true or false. !
DOCTYPE is case sensitive”
B. False
Answer: Option B
In XML it is while in HTML it is not.
2.
Choose the correct statement of HTML
A. In traditional XHTML close tag for some elements is optional but not
encouraged
D. In both traditional XHTML and HTML close tag for some elements is
optional
3.
Which of the following is not a difference between
HTML and XHTML
4.
What indicates the content in file is HTML when
delivered on the network.
5.
State whether the given statement is true or false. “We
can intermix XHTML and HTML 4.01 documents”
A. True
B. False
6.
HTML and XHTML stands for
8.
Which of the following are table tags?
9.
Choose the correct XHTML for width attribute and its
value.
A. width=80
B. width=”80″
C. WIDTH=”80″
D. WIDTH=80
14.
Rendering engine is not responsible for
15.
Firefox uses _________ rendering engine.
A. WebKit
B. Gecko
C. Trident
D. Presto
16.
State true or false. It is faster to render HTML and CSS
than to interpret and execute JavaScript.
A. True
17.
What is the use of “defer” attribute?
D. None of mentioned
18.
Which of the following statements is false?
19.
Which of the following is used to read a HTML page and
render it?
A. Web browser
20.
Which of the following is the first web browser?
A. Nexus
The first web browser was invented in 1990 called World Wide
Web which was later renamed to Nexus.
21.
Who created the first web browser
Powered By
22.
State true or false. Nexus is first graphical web
browser.
B. False
23.
The open source software version of netscape is
B. Mozilla
24.
Which of the following is not an IDE
A. BlueGriffon 1.5.2
B. Aptana studio 3
C. TextEdit(Mac)
D. Dreamweaver
27.
What should we add to a template in Dreamweaver in
order to control where page content goes?
A. Editable Regions
28.
Blue Griffon is based on ________ rendering engine
B. Gecko
29.
Swapping images in dreamweaver is best if
30.
Choose the inappropriate option with respect to Blue
Griffon 1.5.2. Blue Griffon
tion 1 Section 2
31.
State true or false. Maqetta is an open source initiative
of the Dojo Foundation to geared towards visual
designers through a WYSIWYG user interface.
A. True
Powered By
34.
Which of the following is not a web server?
A. Apache tomcat
B. BlueGriffon
C. Jetty
D. Tornado
BlueGriffon is an IDE.
35.
State true or false. Tomcat is an open source web
server that provides a servlet container allowing you to
run Java code.
A. True
36.
LightTPD is not used by
A. You Tube
B. Wikipedia
C. Meebo
D. LocalHost
37.
Which of the following is not a prepackaged server
stack?
A. WAMP
B. XAAMP
C. MAMP
38.
Which of the following is not a channel of mozilla?
A. Firefox
B. Firefox alpha
C. Firefox Beta
D. Firefox Aurora
39.
State true or false. Google Chrome has its own task
manager, which allows you to view and manage your
memory and CPU usage”
A. True
40.
Which of the following are automatically loaded and
operates as a part of browser?
A. Add-ons
B. Plug-ins
C. Utilities
D. Widgets
41.
Which of the following allows user to view a webpage?
D. Internet Browser
Powered By
42.
43.
This is used to
A. HTML5
B. HTML5 Shiv
C. HTML5 Shim
45.
Which one of the following is not a step to install a
library you need to perform the compatibility in
browsers ?
A. navigator.userAgent
47.
Some users have requested tests for IE’s float double
margin bug, and support for position:fixed. Which API
is suitable for them?
48.
___________ 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
49.
____________ allows you to add custom styles to the
document and test an element afterwards.
A. hasEvent()
B. testAllProps()
C. testProp()
D. modernizr.testStyles()
n 1 Section 2
51.
___________ is used to test whether geolocation is
supported in old browsers.
A. Modernizr
B. Modernizr.geolocation
C. Navigator.userAgent
D. Modernizr.js
52.
____________ 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
54.
Metadata store information about the web page that is
not necessarily visible to end users.
A. True
55.
In which part of the HTML metadata is contained?
C. head tag
56.
Which of the following is not a function of robots meta
tag?
A. noindex
B. nofollow
C. norepeat
D. noarchive
57.
What is the role of charset attribute? It specifies
58.
__________ prevents the page from being indexed
altogether.
A. noarchive
B. nofollow
C. noindex
D. novalue
59.
Which of the following is not supported in HTML5 ?
A. scheme
60.
__________ prevents search engines from following
links inside the page
A. noarchive
B. nofollow
C. noindex-__________ prevents the page from being indexed altogether.
D. novalue
ection 2
61.
Different meta tags are defined by changing the
__________ attribute to a valid value.
A. scheme
B. content
C. http-equiv
D. name
62.
__________ prevents search engines from showing a
cached link for the page.
A. nobot
B. nofollow
C. noarchive
D. nosearch
63.
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
64.
__________ is an HTML specification used to add more
information to HTML tags.
A. Macrodata
B. Microdata
C. Minidata
D. Modifydata
65.
The microdata model consists of groups of name-value
pairs known as
A. Item
66.
Every HTML element may have an ____________
attribute specified.
A. itemtype
B. relevant types
C. itemscope
67.
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 ?
68.
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 ?
69.
The ___________ of an item is the value of its element’s
itemid attribute.
A. token
B. typed item
C. global identifier
A. itemscope
B. dom object
C. collection.namedItem
74.
Which of the following applications/software can be
used to create a favicon?
B. Adobe Photoshop
75.
by default, iOS adds ____________ effects to icons.
A. reflective shine
D. apple trademark
76.
Favicon stands for
A. Fav icon
B. Favorite icon
C. Both a and b
77.
Which attribute is used for favicon?
A. icon
B. title
C. rel
D. head
79.
The favicon was standardized by the
B. W3C
80.
In 2003, the .ico format was registered with the
____________
A. IANA
B. W3C
C. WIPO
D. EPO
ection 2
81.
The recommended basic size for a favicon is
___________ pixels
A. 16×16
B. 26×26
C. 48×48
D. both a and c
Powered By
82.
In March 1999, Microsoft released Internet Explorer 5,
which supported favicons for the first time.
A. True
83.
A favicon is an image used by the browser to identify a
website or web application.
A. True
84.
According to the rules of XML and XHTML, all elements
must be closed either with an end tag or by self-closing
with a space, slash, and a right-pointing angle bracket
A. True
85.
__________ is the XML equivalent to strict HTML 4.01.
86.
Which of the following statement is true ?
87.
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
88.
Which of the following encoding an XML parser
assumes ?
A. UTF-8
B. UTF-16
C. UTF-32
D. both a and b
89.
__________ 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+RDF
90.
XML is a markup language where documents must be
marked up correctly.
A. True
ection 2
91.
Which attribute specifies a unique alphanumeric
identifier to be associated with an element?
A. class
B. id
C. article
D. html
Powered By
92.
The _____________ attribute specifies an inline style
associated with an element, which determines the
rendering of the affected element.
A. dir
B. dir
C. class
A. tooltip
B. dir
C. title
94.
The __________ attribute sets the text direction as related
to the lang attribute.
A. lang
B. sub
C. dir
D. ds
.
95.
Which of the following is the attribute that specifies the
column name from the data source object that supplies
the bound data?
A. dataFormatAs
B. datafld
C. disabled
D. datasrc
96.
Which of the following is the attribute that indicates the
name of the data source object that supplies the data that
is bound to this element?
A. dataFormatAs
B. datafld
C. disabled
D. datasrc
97.
Which of the following is the attribute that specifies
additional horizontal space, in pixels, to be reserved on
either side of an embedded item like an iframe, applet,
image, and so on?
A. height
B. hspace
C. hidefocus
D. datasrc
99.
Which of the following is the attribute that is used to set
a global identifier for a microdata item?
A. key
B. id
C. itemclass
D. itemid
100.
Which of the following is the attribute that is used to
add a name/value pair to a microdata item?
A. itemscope
B. itemref
C. itemprop
D. itemid
1.
All attribute declarations begin with the keyword
____________ followed by the element name, attribute
name, attribute type, and default data information.
A. XML
B. SGML
C. ATTLIST
Powered By
Play
Unmute
Loaded: 1.04%
Fullscreen
2.
The ________ declaration specifies which characters
and delimiters may appear in the application.
A. DTD
B. SGML
C. XML
A. Attributes
B. SGML
C. Elements
D. DTD
4.
A/An _________ is essentially a macro that allows a
short name to be associated with replacement text.
A. Entity
B. Attribute
C. Comment
A. DOCTYPE
B. ATTLIST
C. DTD
6.
The __________ begins with a series of parameter
entity definitions.
A. DTD
B. SGML
C. XML
7.
The ______________ parameter identifies a character
encoding, which is a method of converting a sequence
of bytes into a sequence of characters.
A. class
B. element
C. charset
8.
A model group contains the names of the elements that
a tag may enclose.
A. True
B. False
A. dragover
B. dragenter
C. dragstart
D. dragleave
10.
The _________ event is fired on the element where the
drop occurred at the end of the drag operation.
A. drag
B. drop
C. dragstart
D. dragenter
A. drag effects
B. drag data
C. dataTransfer
D. dragenter
Answer: Option C
Solution:
The dataTransfer property of all drag events holds data about
the drag and drop operation.
Powered By
Pause
Unmute
Loaded: 5.50%
Fullscreen
12.
_____________ in textboxes and selections on web
pages is done automatically, so you do not need to
handle dragging yourself.
B. Dragging Text
C. Dragging Files
D. Dragging Links
Answer: Option B
Solution:
Although the process is automatic, it is recommended that you
always add data of the text/plain type as a fallback for
applications or drop targets that do not support other types,
unless there is no logical text alternative. Always add the plain
text type last as it is the least specific.
13.
Calling the ______________ method during both a
dragenter and dragover event will indicate that a drop is
allowed at that location.
A. drop
B. drag
C. preventDefault
D. dataTransfer
Answer: Option C
Solution:
Calling the preventDefault method during both a dragenter and
dragover event will indicate that a drop is allowed at that
location. However, you will commonly wish to call the
preventDefault method only in certain situations, for example,
only if a link is being dragged.
14.
Which of the following property is used to determine
which drag operation was desired?
A. dragend
B. getData
C. dropEffect
D. captureData
Answer: Option C
Solution:
During the drop event, you should retrieve that data that was
dropped from the event and insert it at the drop location. One
can use the dropEffect property to determine which drag
operation was desired.
15.
______________ should include data of two types; the
first should be the URL using the type text/uri-list, and
the second is the URL using the text/plain type.
C. Dragging Files
D. Dragging Links
Answer: Option D
No explanation is given for this question Let's Discuss on
Board
16.
A listener for the dragenter and dragover events are
used to indicate valid drop targets, that is, places where
dragged items may be dropped.
A. True
B. False
Answer: Option A
No explanation is given for this question Let's Discuss on
Board
17.
_____________ and elements in a document may be
dragged using the application/x-moz-node type.
B. Dragging Text
C. Dragging Nodes
Answer: Option C
No explanation is given for this question Let's Discuss on
Board
18.
The tag which allows you to nest other HTML tags
within the description
1. <CAPTION>
2. <TD>
3. <TR>
A. Option 1
B. Option 2
C. Option 3
19.
The first tag inside <TABLE> tag is
1. <HEAD>
2. <CAPTION>
3. <TH>
4. <TD>
A. Option 1
B. Option 2
C. Option 3
D. Option 4
B. Option 2
C. Option 3
D. Option 4