0% found this document useful (0 votes)
22 views61 pages

HTML MCQ

The document contains 1000 multiple choice questions (MCQs) related to HTML, covering various topics such as the definition of HTML, its syntax, and key elements. Each question includes multiple answer options, with explanations provided for the correct answers. The content serves as a comprehensive resource for learning and testing knowledge of HTML.

Uploaded by

l.n.sharma666
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views61 pages

HTML MCQ

The document contains 1000 multiple choice questions (MCQs) related to HTML, covering various topics such as the definition of HTML, its syntax, and key elements. Each question includes multiple answer options, with explanations provided for the correct answers. The content serves as a comprehensive resource for learning and testing knowledge of HTML.

Uploaded by

l.n.sharma666
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 61

HTML MCQ (Multiple Choice Questions)

Here are 1000 HTML MCQ (Chapterwise).


1. What is HTML?
a) HTML describes the structure of a webpage
b) HTML is the standard markup language mainly used to create web pages
c) HTML consists of a set of elements that helps the browser how to view the content
d) All of the mentioned
View Answer
Answer: d
Explanation: HTML is the standard markup language mainly used to create web pages.
HTML describes the structure and layout of a webpage. HTML consists of a series of
elements that helps the browser how to display content easily.

2. Who is the father of HTML?


a) Rasmus Lerdorf
b) Tim Berners-Lee
c) Brendan Eich
d) Sergey Brin
View Answer
Answer: b
Explanation: Timothy John Berners-Lee (TimBL) is known as the father of HTML. He is a
British computer scientist, best known as the inventor of the World Wide Web.

3. HTML stands for __________


a) HyperText Markup Language
b) HyperText Machine Language
c) HyperText Marking Language
d) HighText Marking Language
View Answer
Answer: a
Explanation: HTML stands for “HyperText Markup Language”. HTML is the standard
markup language mainly used to design and create web pages and web applications.

4. What is the correct syntax of doctype in HTML5?


a) </doctype html>
b) <doctype html>
c) <doctype html!>
d) <!doctype html>
View Answer
Answer: d
Explanation: The correct syntax of HTML5 doctype is <!doctype html>, doctype is the very
first thing to write in HTML5. <!doctype html> or <!DOCTYPE HTML> both are same
because ‘doctype’ keyword is not case sensitive.

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.

8. What is DOM in HTML?


a) Language dependent application programming
b) Hierarchy of objects in ASP.NET
c) Application programming interface
d) Convention for representing and interacting with objects in html documents
View Answer
Answer: d
Explanation: The Document Object Model is a cross-platform and language-independent
application programming interface that treats an HTML, XHTML, or XML document as a
tree structure. A document can be viewed as a logical tree with help of DOM Model.

9. In which part of the HTML metadata is contained?


a) head tag
b) title tag
c) html tag
d) body tag
View Answer
Answer: a
Explanation: Metadata is information about data. The meta tag provides metadata/meta
information about the HTML document. Metadata will not be displayed on the page.
Metadata is present in head. The body tag defines document’s body. A title tag is an HTML
element which specifies the title of a web page.

10. Which element is used to get highlighted text in HTML5?


a) <u>
b) <mark>
c) <highlight>
d) <b>
View Answer
Answer: b
Explanation: The <mark> element is used to highlight a section of text. It is useful for
quoting a text or if one wants to bring attention to the text. The <b> tag is used to make
text/paragraph bold. <u> tag is used to underline the text you wanted.
<p>This is the example.<mark> I like this dog. </mark></p>

Output: This is the example. I like this dog.

11. Which of the following is not a HTML5 tag?


a) <track>
b) <video>
c) <slider>
d) <source>
View Answer
Answer: c
Explanation: <video> tag is used to display video clips in HTML5. Multiple media resources
for media elements is specified by <source> tag. Text track for media elements i.e. <audio>
& <video> is provided by <track> tag in HTML5. There is no such thing as slider tag in
HTML5.

12. How do we write comments in HTML?


a) </…….>
b) <!……>
c) </……/>
d) <…….!>
View Answer
Answer: b
Explanation: Browser ignores comment in a code. There are always two types of command
i.e. single line command and multiple line command. If one wants to add a comment in
code, add the text between these characters <!…..comment….>. It will not visible in the
user’s browser.

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.

15. Which element is used for or styling HTML5 layout?


a) CSS
b) jQuery
c) JavaScript
d) PHP
View Answer
Answer: a
Explanation: For styling HTML5, CSS i.e Cascading Style Sheet is used. It is style sheet
language and designed to describe presentation of its content including layouts, colors and
fonts. CSS can control the layout of multiple webpages.

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.

17. Which HTML tag is used to insert an image?


a) <img url=”htmllogo.jpg” />
b) <img alt=”htmllogo.jpg” />
c) <img src=”htmllogo.jpg” />
d) <img link=”htmllogo.jpg” />
View Answer
Answer: c
Explanation: In HTML, <img> tag is used to insert an image in HTML page. Image tag has
two attributes (src and Alt).
–> Src attribute is used to specify the image path.
–> Alt attribute is used to specify the alternate text for the image.
18. HTML is a subset of ___________
a) SGMT
b) SGML
c) SGME
d) XHTML
View Answer
Answer: b
Explanation: HTML is a subset of SGML. SGML (Standard Generalized Markup Language)
is a standard for specifying a document markup language or tag set.

19. Which character is used to represent when a tag is closed in HTML?


a) #
b) !
c) /
d) \
View Answer
Answer: c
Explanation: The forward-slash (/) is used to indicate the closure of a tag within HTML.

20. Which of the following HTML code will make an image clickable?
a)

<a href="https://www.sanfoundry.com/">Sanfoundry Home Page</a>

b)

<img src="https://www.sanfoundry.com/sanfoundry-logo">
<a href="https://www.sanfoundry.com/">Sanfoundry Home Page</a>
</img>

c)

<a href="https://www.sanfoundry.com/">Sanfoundry Home Page</a>


<img src="https://www.sanfoundry.com/sanfoundry-logo" />

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.

21. Among the following, which is the HTML paragraph tag?


a) <p>
b) <pre>
c) <hr>
d) <a>
View Answer
Answer: a
Explanation: <p> tag is used for paragraph in HTML.

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.

23. Which HTML element is used for short quote?


a) <em>
b) <abbr>
c) <q>
d) <blockquote>
View Answer
Answer: c
Explanation: <em> element indicates emphasis, browser will show the contents of <em>
element in italic. A section which is quoted from another source is specified by
<blockquote>. The <abbr> defines abbreviation. We used <q> element for shorter quote.
Browser put quote around <q> element.
<p>This is a <q>black dog</q>.</p>

Output: This is a “black dog”.

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>

25. Which HTML element is used for abbreviation or acronym?


a) <abbr>
b) <blockquote>
c) <q>
d) <em>
View Answer
Answer: a
Explanation: <em> element indicates emphasis, browser will show the contents of <em>
element in italic. We used <q> element for shorter quote. Browser put quote around <q>
element. A section which is quoted from another source is specified by <blockquote>. For
using, abbreviation or acronym <abbr> element is helpful. A title element is to be used with
abbr.
<p>The <abbr title=”Doctor”>Dr.</abbr> is on the way.</p>

Output: The Dr. is on the way.

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.

27. What is the work of <address> element in HTML5?


a) contains IP address
b) contains home address
c) contains url
d) contains contact details for author
View Answer
Answer: d
Explanation: The contact details for author of a page is specified by <address> attribute.
The content is often displayed in italics,
e.g.
<address>
<a href="mailto:[email protected]">Sanfoundry</a>
</address>

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>

Output: This is not for deletion.

30. What is the correct syntax of web address?


a) port://domain.filenmae:path/scheme/prefix
b) prefix://scheme.port:domain/filename/path
c) path://prefix.port:domain/filename/scheme
d) scheme://prefix.domain:port/path/filename
View Answer
Answer: d
Explanation: The correct syntax for a web address is
scheme://prefix.domain:port/path/filename, where scheme is for https or http, prefix is for
domain like www, domain denotes domain name, port defines port number, path defines
path at server, filename is for name of the document.

31. Which tag is used to create a dropdown in HTML Form?


a) <input>
b) <select>
c) <text>
d) <textarea>
View Answer
Answer: b
Explanation: <select> element is used to create a drop-down list in HTML Forms. It is
mainly used to collect user input. Option tags are used within the <select> element to define
available options from the drop-down list.

32. Which tag is used to create a numbered list in HTML?


a) <ol>
b) <ul>
c) <li>
d) <ll>
View Answer
Answer: a
Explanation: <ol> tag is used to create the numbered list or ordered list items in an HTML
document. An ordered list can be numerical or alphabetical order. <li> tag is used to define
each list item.
Syntax: <ol> Ordered List Items </ol>
33. How to create a checkbox in HTML Form?
a) <input type=”text”>
b) <input type=”textarea”>
c) <input type=”checkbox”>
d) <input type=”button”>
View Answer
Answer: c
Explanation: <input type=”checkbox”> is used to create a checkbox in HTML Form.
Checkboxes allow a user to select one or more options of a limited number of choices.

34. How to insert Hyperlink in HTML Page?


a)

<a href="https://www.sanfoundry.com/1000-html-questions-answers/">HTML MCQ</a>

b)

<a target="https://www.sanfoundry.com/1000-html-questions-answers/" HTML Quiz


/>

c)

<a src="https://www.sanfoundry.com/1000-html-questions-answers/">HTML Test</a>

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.

35. Which of the following extension is used to save an HTML file?


a) .hl
b) .h
c) .htl
d) .html
View Answer
Answer: d
Explanation: .html or .htm extensions are used to save the HTML file.

36. Which tag is used to create a blank line in HTML?


a) <b>
b) <br>
c) <em>
d) <a>
View Answer
Answer: b
Explanation: In HTML, <br> tag is used to create a blank line. <b> tag is used to specify the
bold text. <em> tag is used to define the emphasized text.

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.

38. What is the use of <hr/> tag in HTML?


a) For making content appearance italics
b) To create vertical rule between sections
c) To create a line break
d) To create horizontal rule between sections
View Answer
Answer: d
Explanation: To create a break between themes-such as a change of topic in a book or a
new scene in a play-you can add a horizontal rule between sections using <hr/> tag

39. Which attribute is not essential under <iframe>?


a) frameborder
b) width
c) height
d) src
View Answer
Answer: a
Explanation: An iframe is equivalent to a window that has been cut into our page, it is
created using <iframe> element. Src, height, width attribute are essentially used inside of
this. Src attribute specifies the URL of the page which is to be shown. Height and width
specify the height and width of an iframe in pixels.

40. Which works similar to <b> element?


a) <blockquote>
b) <strong>
c) <em>
d) <i>
View Answer
Answer: b
Explanation: The words are written inside <strong> can be said with strong emphasis.
Browser shows contents written inside <strong> element in bold.
Example:
<p>1000 <strong>HTML</strong> MCQs.</p>

Output: 1000 HTML MCQs.


41. Which tag is used to underline the text in HTML?
a) <p>
b) <u>
c) <i>
d) <ul>
View Answer
Answer: b
Explanation: In HTML, underline tag (<u>) is used to display the underlined text.
Example: HTML stands for <u>HyperText Markup Language</u>.

42. Which attribute specifies a unique alphanumeric identifier to be associated with an


element?
a) type
b) article
c) id
d) class
View Answer
Answer: c
Explanation: HTML is Hyper Text Markup Language that is used to create web pages and
applications. The id attribute is most used to point to a style in a style sheet, and by
JavaScript (via the HTML DOM) to manipulate the element with the specific id. Class is a
name given to HTML elements that can be used by CSS and JavaScript for styling web
pages. A self-contained content is called an attribute.

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.

44. Which HTML element is used for YouTube videos?


a) <samp>
b) <small>
c) <frame>
d) <iframe>
View Answer
Answer: d
Explanation: We can host our videos through YouTube and can easily embed them into our
website. <iframe> tag will be used for YouTube videos.
E.g. <iframe width=”670” height=”612” src= “https://sanfoundry.com”> </iframe>

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

B. In traditional HTML close tag for some elements is optional but


not encouraged
C. None of the mentioned

D. In both traditional XHTML and HTML close tag for some elements is
optional

In HTML close tags are optional but not in XHTML.

3.
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. None of the mentioned

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

All other options are correct.

4.
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. None of the mentioned

5.
State whether the given statement is true or false. “We
can intermix XHTML and HTML 4.01 documents”

A. True

B. False

HTML is not in XML format. You have to make the changes


necessary to make the document proper XML before you can
get it accepted as XML.

6.
HTML and XHTML stands for

A. Hyper Text Markup Language and EXtensible HyperText


Markup Language

8.
Which of the following are table tags?

A. table, thead, tr, td


B. colspan, table, tr

C. table, tt, tr, td

D. none of the mentioned

9.
Choose the correct XHTML for width attribute and its
value.

A. width=80

B. width=”80″

C. WIDTH=”80″

D. WIDTH=80

Always mention the attribute value in quotes and XHTML is


case sensitive.
12.
Which of the following is not a correct (X)HTML rule?

D. Unknown attributes are ignored by the browser

14.
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. none of the mentioned

All the options mentioned are responsibility of rendering


engine.

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?

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. None of mentioned

18.
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

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

A. Tim Berners Lee

Sir Timothy John “Tim” Berners-Lee, also known as TimBL, is an


English computer scientist, best known as the inventor of the
World Wide Web. He made a proposal for an information
management system in March 1989, and he implemented the
first successful communication between a Hypertext Transfer
Protocol (HTTP) client and server via the Internet sometime
around mid-November of that same year.

Powered By

22.
State true or false. Nexus is first graphical web
browser.

B. False

Netscape is first graphical web browser.

23.
The open source software version of netscape is

B. Mozilla

On February 23, 1998, Netscape Communications Corporation


created a project called Mozilla to co-ordinate the development
of the Mozilla Application Suite, the open source version of
Netscape’s internet software, Netscape Communicator.

24.
Which of the following is not an IDE

A. BlueGriffon 1.5.2
B. Aptana studio 3

C. TextEdit(Mac)

D. Dreamweaver

TextEdit is a highly versatile word processor included with OS X.

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

BlueGriffon is a new WYSIWYG content editor for the


World Wide Web. Powered by Gecko, the rendering
engine of Firefox, it’s a modern and robust solution to
edit Web pages in conformance to the latest Web
Standards.

29.
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

30.
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

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

D. None of the mentione

All the options mentioned (WAMP, XAMPP, and MAMP)


are prepackaged server stacks.

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

Plugin programs are automatically loaded and operates as a


part of browser.
Section 1 Section 2

41.
Which of the following allows user to view a webpage?

D. Internet Browser

Powered By

42.
43.
This is used to

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

A. make web page compatible only with IE8

B. mimic behaviour of IE8

C. make web page incompatible only with IE8

D. None of the mentioned


44.
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. None of the mentioned

45.
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


46.
Which property is used to detect the browser’s user
agent and code based on the pertinent cases?

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?

A. mq() media Plugin API

B. addTest() Plugin API

C. testAllProps() Plugin API

D. none of the mentioned

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

D. None of the mentioned

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

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. none of the mentioned

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

D. none of the mentioned

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 ?

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.

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 ?

A. The value is the element’s datetime value.

69.
The ___________ of an item is the value of its element’s
itemid attribute.

A. token

B. typed item

C. global identifier

D. none of the mentioned


70.
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. none of the mentioned

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

B. square corners and reflective shine


C. rounded corners and reflective shine

D. apple trademark

76.
Favicon stands for

A. Fav icon

B. Favorite icon

C. Both a and b

D. None of the above

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

In 2003, the .ico format was registered with the Internet


Assigned Numbers Authority (IANA) under the MIME
type image/vnd.microsoft.icon

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

The favicon is supposed to be a set of 16×16, 32×32 and


48×48 pictures in ICO format.

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.

A. XHTML 1.0 Strict

B. XHTML 1.0 Frameset

C. XHTML 1.0 Transitional

D. None of the mentioned

Answer & Solution

86.
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. None of the mentioned

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

The xmlns attribute specifies the xml namespace for a


document.

88.
Which of the following encoding an XML parser
assumes ?

A. UTF-8

B. UTF-16

C. UTF-32
D. both a and b

If an XML document lacks encoding specification, an


XML parser assumes that the encoding is UTF-8 or UTF-
16.

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

D. none of the mentioned


93.
Which attribute is used to provide an advisory text about
an element or its contents.

A. tooltip

B. dir

C. title

D. none of the mentioned

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

Home / HTML / HTML Fonts, Tags And Elements

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

D. None of the mentioned


Answer & Solution Discuss in Board Save for Later

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

D. None of the mentioned

Answer & Solution Discuss in Board Save for Later


3.
The __________ defines the syntax of markup
constructs and include additional definitions such as
character entity references.

A. Attributes

B. SGML

C. Elements

D. DTD

Answer & Solution Discuss in Board Save for Later

4.
A/An _________ is essentially a macro that allows a
short name to be associated with replacement text.

A. Entity

B. Attribute

C. Comment

D. None of the mentioned

Answer & Solution Discuss in Board Save for Later


5.
The ___________ keyword begins the declaration of
attributes that an element may take. It is followed by the
name of the element in question, a list of attribute
definitions, and a closing.

A. DOCTYPE

B. ATTLIST

C. DTD

D. None of the mentioned

Answer & Solution Discuss in Board Save for Later

6.
The __________ begins with a series of parameter
entity definitions.

A. DTD

B. SGML

C. XML

D. None of the mentioned


Answer & Solution Discuss in Board Save for Later

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

D. none of the mentioned

Answer & Solution Discuss in Board Save for Later

8.
A model group contains the names of the elements that
a tag may enclose.

A. True

B. False

Answer & Solution Discuss in Board Save for Later


9.
Which event is fired as the mouse is moving over an
element when a drag is occurring?

A. dragover

B. dragenter

C. dragstart

D. dragleave

Answer & Solution Discuss in Board Save for Later

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 & Solution Discuss in Board Save for Later

Answer & Solution

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.

A. Dragging HTML and XML

B. Dragging Text

C. Dragging Files

D. Dragging Links

Answer & Solution Discuss in Board Save for Later

Answer & Solution

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 & Solution Discuss in Board Save for Later

Answer & Solution

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 & Solution Discuss in Board Save for Later

Answer & Solution

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.

A. Dragging HTML and XML


B. Dragging Text

C. Dragging Files

D. Dragging Links

Answer & Solution Discuss in Board Save for Later

Answer & Solution

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 & Solution Discuss in Board Save for Later

Answer & Solution

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.

A. Dragging HTML and XML

B. Dragging Text

C. Dragging Nodes

D. None of the mentioned

Answer & Solution Discuss in Board Save for Later

Answer & Solution

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

D. None of the above

Answer & Solution Discuss in Board Save for Later

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

Answer & Solution Discuss in Board Save for Later


20.
Which tag will you add to specify a font for your whole
page ?
1. <defaultfont>
2. <targetfont>
3. <basefont>
4. <font>
A. Option 1

B. Option 2

C. Option 3

D. Option 4

You might also like