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 [Link]
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=”[Link]” />
b) <img alt=”[Link]” />
c) <img src=”[Link]” />
d) <img link=”[Link]” />
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="[Link] Home Page</a>
b)
<img src="[Link]
<a href="[Link] Home Page</a>
</img>
c)
<a href="[Link] Home Page</a>
<img src="[Link] />
d)
<a href="[Link]
src="[Link] /></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="[Link]
</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://[Link]:path/scheme/prefix
b) prefix://[Link]:domain/filename/path
c) path://[Link]:domain/filename/scheme
d) scheme://[Link]:port/path/filename
View Answer
Answer: d
Explanation: The correct syntax for a web address is
scheme://[Link]: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="[Link] MCQ</a>
b)
<a target="[Link] HTML Quiz
/>
c)
<a src="[Link] Test</a>
d)
<a>[Link]
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= “[Link] </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.
Which of the following can read and render HTML web pages
Server
head Tak
web browser
empty
Check Answer
2.
Identify the range of byte data types in JavaScript.
-10 to 9
- 128 to 127
-32768 to 32767
-2147483648 to 2147483647
Check Answer
3.
Among the following operators identify the one which is used to allocate memory to array
variables in JavaScript.
new
new malloc
alloc
malloc
Check Answer
4.
The latest HTML standard is
HTML 4.0
HTML 5.0
XML
SGML
Check Answer
5.
Why were cookies designed?
for server-side programming
For client-side programming
both a and b
None
Check Answer
6.
What are variables used in JavaScript programs
Varying randomly
Storing numbers, dates, and other values
Used as header files
none of the above
Check Answer
7.
Simple network management protocol uses which of the following port number
164
163
160
161
Check Answer
8.
Identify the incorrect HTML tag among the following
< input>
<select>
< list>
< textarea>
Check Answer
9.
Full form of W3C is _____________
World Wide Websites community
World Wide Web community
World Wide Websites consortium
World Wide Web consortium
Hide
Correct Answer
Explanation: D) W3C stands for World Wide Web consortium.
10.
Identify the empty or void element in HTML.
<sup>
<br>
<p>
< abbr>
Check Answer
11.
Which of the following attribute is used for merging two or more adjacent columns?
ROWSPAN
CELLSPACING
COLSPAN
CELLPADDING
Hide
Correct Answer
Explanation: C) COLSPAN Is used for merging two or more adjacent columns.
12.
Which of the following is used to transmit information on the world wide web?
HPPT
HTTP
HTTTP
HTPP
Hide
Correct Answer
Explanation: B) HTTP Is used to transmit information on the world wide web.
13.
A website is a _______ cookie.
volatile
transient
in transient
non-volatile
Hide
Correct Answer
Explanation: B) a website is a transient cookie.
14.
Among which of the following is HTML a subset.
SGMD
SGMT
SGML
None
Hide
Correct Answer
Explanation: C) HTML it is a subset of SGML.
15.
When is the body tag used?
after FORM tag
after Title tag
after EM tag
after HEAD tag
Hide
Correct Answer
Explanation: D) Body tag is used after the HEAD tag.
16.
To establish the base URL which of the following is used?
BASE element
HEAD element
both a and b
None
Hide
Correct Answer
Explanation: A) To establish the base URL BASE element is used.
17.
On which model is www based upon
client-server
local server
3 tier
none of this
Hide
Correct Answer
Explanation: A) www is based upon client-server.
18.
Identify the container among the following
< body>
< select>
< input>
both a and b
Hide
Correct Answer
Explanation: D) Both <body> and <select> containers.
19.
Which of the following attribute defines the relationship between the current document and
URL?
URL
REV
REL
None
Hide
Correct Answer
Explanation: C) REL defines the relationship between the current document and HREF’ed
URL.
20.
The MIME text file is saved with which of the following extension
THM extension
HTML extension
HTM extension
None
Hide
Correct Answer
Explanation: B) MIME text file is saved with HTML extension.
21.
Why is XPATH used?
To address the server
to store the IP address of this server
to address the document by specifying a location path
none
Hide
Correct Answer
Explanation: C) XPATH is used to address the document by specifying a location path
22.
Identified among the following which creates push button
RESET
CHECK BOX
INPUT
RADIO
Hide
Correct Answer
Explanation: A) RESET is used to create a push-button.
23.
Choose whether true or false: The tag elements in XML are case-sensitive.
True
False
Hide
Correct Answer
Explanation: A) True. The tag elements in XML are case-sensitive.
24.
How many sizes of headers are available in HTML by default?
5
1
3
6
Hide
Correct Answer
Explanation: D) 6 headers are available in HTML by default ranging from h1 to h6.
25.
What are the types of lists available in HTML?
Ordered, unordered lists
Bulleted, numbered lists
Named, Unnamed lists
None of the above
Hide
Correct Answer
Explanation: A) The lists available in HTML are Ordered and Unordered List.
26.
HTML files are saved by default with the extension?
.h
.html
.ht
None
Hide
Correct Answer
Explanation: B) HTML files are saved by the .html or .htm extension.
27.
What is the effect of the \<b> tag?
It converts the text within it to a bold tag.
It is used to write black-colored font
It is used to change the font size.
None
Hide
Correct Answer
Explanation: A) It converts the text within it to a bold tag.
28.
Which of the following tags doesn’t require a closing tag?
\<br>
\<hr>
Both (a) and (b)
None
Hide
Correct Answer
Explanation: C) Both the \<hr> and the \<br> tag doesn’t require a closing tag.
29.
What are the attributes used to change the size of an image?
Big and Small
Width and height
Top and bottom
None
Hide
Correct Answer
Explanation: B) Width and Height attributes are used to change the size of an image.
30.
Which attribute is used to provide a unique name to an HTML element?
id
class
type
None
Hide
Correct Answer
Explanation: A) An id is used to provide a unique name for an HTML element that can be used
to identify it.
31.
What is the function of the HTML style attribute?
It is used to add styles to an HTML element.
It is used to uniquely identify some specific styles of some elements.
Both (a) and (b)
None
Hide
Correct Answer
Explanation: A) It is used to add styles to an HTML element.
32.
Which HTML element is used to define description data?
\<li>
\<ol>
\<dd>
\<dl>
Hide
Correct Answer
Explanation: C) Description data is defined by <dd> tag.
33.
Which of the following properties is used to change the font of text?
font-family
font-size
text-align
None
Check Answer
34.
Choose the correct option related to XML.
It cannot be used as a database
it can be used as a database
it is a storage format but a textual storage format which can be called a language
it is not a database, it is a language
Hide
Correct Answer
Explanation: C) XML is a storage format but a textual storage format that can be called a
language.
35.
Where is the map definition file generally stored?
RECYCLE BIN
CGI-BIN
BIN
All of the above
Hide
Correct Answer
Explanation: B) The map definition file is generally stored in CGI-BIN.
36.
Choose whether true or false: XML is an imperative language.
True
False
Hide
Correct Answer
Explanation: B) False. XML is a declarative language.
37.
What is Document Object Model(DOM)?
a coding style
Specification
a parser
none
Hide
Correct Answer
Explanation: C) DOM is a parser.
38.
Identify the function in JavaScript which is used to send messages to users requesting for text
input?
alert()
prompt()
display()
getInput()
Hide
Correct Answer
Explanation: B) prompt() it is used to send messages to users requesting text input.
39.
Identify the method which is used to specify a container's layout in JSP.
setContainerLayout()
Layout()
setLayout()
none
Hide
Correct Answer
Explanation: C) setLayout() Is used to specify a container's layout in JSP.
40.
To get the current system date which of the following function is used in ASP?
CurrentDate()
getDate()
Now()
Date()
Hide
Correct Answer
Explanation: D) Date() Is used to get the current system date.
41.
The full form of DOM is?
Document-oriented memory
document object model
document object memory
none
Hide
Correct Answer
Explanation: B) DOM stands for document object model.
42.
Identify the total standard color names that HTML supports.
30
70
140
120
Hide
Correct Answer
Explanation: C) HTML supports a total of 140 standard color names.
43.
Identify the tag used to give paragraph
<p>
<br>
<marquee>
< pre>
Hide
Correct Answer
Explanation: A) <p> Is used to give paragraph.
44.
Identify the tag which is used to define a concept in HTML.
<p>
<def>
<marquee>
< pre>
Hide
Correct Answer
Explanation: B) <def> is used to define a concept in HTML
45.
Identify the standard network protocol used to transfer computer files between a client and server
on a computer network.
Physical
TCP/IP
FTP
Hyperlink
Hide
Correct Answer
Explanation: C) FTP is the standard protocol used to transfer computer files between the client
and server in a computer network.
46.
Choose among the following, which is the most common internet protocol.
PPP
FTP
TCP/IP
SMTP
Hide
Correct Answer
Explanation: D) SMTP is the most commonly used internet protocol.
47.
Choose the port number of FTP.
23
21
110
143
Hide
Correct Answer
Explanation: B) The port number of FTP is 21
48.
What does MIME stand for?
Multipurpose Internet Mail Extra
Multi Internet Mail End
Multipurpose Internet Mail Email
Multipurpose Internet Mail Extensio
Hide
Correct Answer
Explanation: D) MIME stands for Multipurpose Internet Mail Extension.
49.
Which of the following is used to allocate and manage resources for a network?
Bluetooth
Server
Node
None of the above
Hide
Correct Answer
Explanation: B) Server is used to allocate and manage resources for a network.
50.
Identify among the following servers which allow LAN users to share data.
Communication server
Point server
Data server
File server
Hide
Correct Answer
Explanation: D) File server allows LAN users to share data.