HTML MCQs

HTML MCQs

Try to answer these 800 HTML MCQs and check your understanding of the HTML subject. Scroll down and let's begin!

1: What is the purpose of this HTML statement? <SCRIPT type="text/javascript">

A.   None of these

B.   To define JavaScript code

C.   To format text

D.   To define an applet

2: Which HTML attribute is used to set the space between cells in an HTML <TABLE> element?

A.   cellpadding

B.   cellspacing

C.   cellspan

D.   cellspace

3: Increasing the cellpadding value will what ?

A.   Decrease the space between cells

B.   Increase the space between cells

C.   Increase the distance between cell and content

D.   Increase the softness of your site

E.   Decrease the softness of your site

4: What is a deprecated HTML element or attribute?

A.   A feature that can only be used once in the HTML document.

B.   An outdated feature that may become obsolete in future versions of HTML.

C.   A feature that has more than one defined use.

D.   An underused feature that is only used by experts.

5: What is this? <a href="/some/page#foo">Label</a>

A.   A link to the resource "/some/page". When visited the browser will attempt to jump the viewport to an element with an id="foo"

B.   A link to the resource "/some/page". The "foo" is the query string.

C.   A link to the resource "/some/page#foo" (a file on the web server by that name).

6: Which HTML specification contains definitions for the elements: <article>, <nav>, <header> and <footer>?

A.   HTML 4.01

B.   XHTML 1.0

C.   HTML 3.2

D.   HTML5

E.   All of these.

7: Which of the following is the correct doctype declaration for HTML5?

A.   <!DOCTYPE html>

B.   <!HTML>

C.   <!DOCTYPE html5>

D.   <!HTML5>

8: <pre> tag defines:

A.   block of code for presentation

B.   preformatted text

C.   prerequisites for a new block of text

9: Choose the valid HTML comment.

A.   <!-- Comment -->

B.   <-- Comment -->

C.   <!-- Comment --!>

10: What is the preferred way for adding a background color in HTML?

A.   <background>yellow</background>

B.   <body style="background-color:yellow;">

C.   <body background="yellow">

11: What symbol differentiates most opening tags from closing tags?

A.   /

B.   !

C.   ;

D.   .

E.   #

12: What are the three list types in HTML?

A.   Unordered, Ordered, Definitions

B.   Random, Numbered, Definitions

C.   Unordered, Numbered, Definitions

D.   Random, Ordered, Footnotes

13: Which HTML tag is an inline element?

A.   <span>

B.   <p>

C.   <ul>

D.   <div>

A.   alt

B.   name

C.   alternative

D.   id

E.   str

15: The HTML <BUTTON> tag

A.   returns the user to the home page.

B.   makes an image a link.

C.   specifies when to submit HTML form data.

D.   creates a push button on a form.

16: What does the following HTML tag display? <DIV id="text" align="right">content</DIV>

A.   A DIV with a class called text and its content aligned center.

B.   A DIV with an id called text and its content aligned right.

C.   A DIV with an id called text and its content aligned left.

D.   A DIV with a class called text and its content aligned right.

17: How do you create a radio type on an HTML form?

A.   <p><input button="rad" value="radio"></p>

B.   <p><input type="radio" value="rad"></p>

C.   <p><input value="radio" name="rad"></p>

18: What is the highest level element on a given page?

A.   <body>

B.   <section>

C.   <html>

D.   <head>

19: Which answer best describes the following HTML? <OL><LI>1</LI><LI>2</LI><LI>3</LI></OL>

A.   A numbered list with 3 options

B.   An unnumbered list with 3 options

C.   An unnumbered list with 2 options

D.   A numbered list with 2 options

20: What is the primary difference between a DIV and a SPAN element?

A.   DIV is commonly used and SPAN is deprecated

B.   A DIV is used for block level elements and a SPAN is used for inline elements.

C.   A DIV is used with primary elements while a SPAN is used with secondary elements.

D.   A DIV is used for inline elements and a SPAN is used for block level elements.

21: True or False? The "charset" attribute can be applied to only one <meta> element per HTML document.

A.   False

B.   True

A.   _blank

B.   _parent

C.   _son

23: The <div> element is an example of...

A.   a block element

B.   a diverse element

C.   a layer

D.   an inline element

24: Which attribute can be used with the <img> tag to override or reserve the dimensions of the box?

A.   vert / horiz

B.   height / width

C.   fallback-dimensions="width" and fallback-dimensions="height"

D.   x / y

25: What is the correct HTML tag for an inline frame?

A.   <IFRAME>

B.   <INLINEFRAME>

C.   <INFRAME>

D.   <INLINE>

26: If you don’t want the frame windows to be resizeable, simply add what to the <frame> lines

A.   noresize

B.   save

C.   dontresize

27: Why should you add alternative text to your images ?

A.   In case the user wishes to load a different picture

B.   So the user can save the image using the text as a name

C.   So the users can get an idea of what the image is before it loads

28: Which attribute would you use to specify how many rows an HTML table cell should span?

A.   rwspan

B.   row span

C.   row_span

D.   rowspan

29: Which HTML tags are used to turn text underlining on and off?

A.   <ULine> and </Uline>

B.   <U> and </U>

C.   <STRIKE> and </STRIKE>

D.   <L> and </L>

30: The correct way to add a blank space into the markup of your HTML is to use  ?

A.   True

B.   False

31: Which attribute of the <IMG> tag tells the browser what to display if a user cannot view the image?

A.   info

B.   alt

C.   img info

D.   text

32: Which of the following HTML elements does NOT belong in the <HEAD> section of an HTML file?

A.   <META>

B.   <TITLE>

C.   <LINK>

D.   <H1>

33: HTTP stands for...

A.   Hypertext Transmission Protocol

B.   Hypertext Transfer Protocol

C.   High Transmission Transfer Protocol

D.   Hypertext Trend Protocol

A.   title

B.   alt

C.   target

D.   open

E.   follow

35: What is the purpose of the HTML <EM> tag?

A.   To define external interactive content

B.   To define a table caption

C.   To define emphasized text

D.   To define a body element

E.   None of these

36: What is a use for the class attribute in HTML?

A.   as a script defined by XHTML

B.   to select a class in a style sheet

C.   as a META variable

D.   as a marker for an HTML function

37: Which of the following is an example of an HTML hidden field?

A.   <INPUT="hidden" />

B.   <INPUT type="hide" />

C.   <INPUT field="hidden" />

D.   <INPUT type="hidden" />

A.   vertical link

B.   visited link

C.   active link

D.   unvisited link

39: What is the purpose of html?

A.   HTML simplifies database connectivity

B.   HTML provides functionality to manipulate the DOM

C.   HTML provides structure for web pages

D.   HTML controls the MVC design pattern

E.   HTML adds style to static web elements

40: Why would you use the HTML <DIV> tag?

A.   None of these

B.   To apply a <B> or <I> tag to a part of a web page.

C.   To format grouped block-elements with styles.

D.   To insert JavaScript code or an applet.

41: Which attribute gives a unique identity for an HTML element?

A.   class

B.   identity

C.   div

D.   id

42: <__________________________ content="A description of your page"> Fill in the blank to create a tag that would give a description of your page.

A.   cssvalue

B.   description

C.   div change="keyword"

D.   marquee

E.   meta name="description"

43: Which tag is known as Subscript?

A.   <sub >

B.   <sp>

C.   <ss>

D.   <ssp>

E.   <sup>

44: Which HTML tag contains the main visual content of an HTML document?

A.   <BODY>

B.   <DOC>

C.   <HEAD>

D.   <SITE>

45: Which Specifies the maximum number of characters for the text field?

A.   None

B.   maximumlength

C.   maxlength

D.   largelength

46: Which HTML tag creates a horizontal line?

A.   <HR>

B.   <LINE>

C.   <HL>

D.   <H>

47: Which of the following HTML elements denotes the name of the page?

A.   <TITLE>

B.   <NAME>

C.   <PAGE TITLE>

D.   <PAGE NAME>

48: What is the purpose of a span tag?

A.   implement a visual change

B.   group in-line elements in a document

49: What does <A href="#title2"> create?

A.   A named area on the web page called title2.

B.   The word title in Heading Style 2.

C.   A hyperlink within a web page to an area named title2.

D.   A caption to an image called title2.

50: Which one is the mandatory attribute of the <img> tag?

A.   SRC

B.   ID

C.   HREF

D.   ALT

51: Which of the following defines a multi-line text input control in HTML?

A.   <text rows="2" cols="20">

B.   <ml rows="2" cols="20">

C.   <textarea rows="2" cols="20">

D.   <area rows="2" cols="20">

52: Which tag is used to insert images into your web page?

A.   img

B.   txt

C.   src

D.   doc

E.   pic

53: <ol> tags will create what kind of list ?

A.   Numbered List

B.   Bulleted List

C.   Grocery List

54: What is "HTTP" short for?

A.   Hyper Transfer Protocol

B.   Hyper Transient Port

C.   HyperText Transfer Protocol

D.   HyperText Translated Program

E.   HyperText Transformation Protocol

55: An Ordered List can be represented as

A.   <ol>

B.   <el>

C.   <li>

D.   <ul>

56: Which of the following tags can be used in place of a button tag?

A.   ol

B.   legend

C.   dl

D.   input

57: Which HTML tags can be used inside the element <head> ?

A.   <ul>, <li>

B.   <meta>, <base>

C.   <p>, <br>

D.   <h1>, <h2>

E.   <th>, <td>

58: What of the following HTML tags is used for computer code text?

A.   <CODE>

B.   <CITE>

C.   <KBD>

D.   <VAR>

59: HTML stands for:

A.   Hyper Text Markup Language

B.   Hyperlinks Text Markup Language

C.   None of these

D.   Home Text Markup Language

60: How many values can the class attribute have per HTML element?

A.   1

B.   0

C.   unlimited

D.   2

61: Which HTML tag would be used for mp3 files?

A.   <embed height="50" width="100" src="horse.mp3">

B.   <input height="50" width="100" src="horse.mp3">

62: What must be the first element in an HTML page?

A.   <!DOCTYPE>

B.   <HEAD>

C.   <TITLE>

D.   <BODY>

63: What does Web Hosting mean?

A.   None of these

B.   accessing your email from a mail server

C.   storing your website on a public server

D.   creating a web page with HTML

64: A web browser interprets every HTML tag until it finds

A.   </END>

B.   </CLOSE>

C.   </TERMINATE>

D.   </HTML>

65: All the controls of a form should be enclosed within the

A.   opening and closing <firm> tag

B.   none

C.   opening and closing <frm> tag

D.   opening and closing <form> tag

66: <EM> is the HTML element for

A.   extra markup.

B.   emphasized text.

C.   strikethrough text.

D.   keyboard text.

67: Which type of parameter specify the path where your image is placed?

A.   path

B.   scr

C.   src

68: What is the purpose of the <!DOCTYPE> declaration?

A.   To label the page with an appropriate heading.

B.   None of these

C.   Notify the browser which version of HTML the page uses.

D.   To enclose the markup tags.

69: Which HTML target attribute value is used to tell the browser to load the document in a new, unnamed window?

A.   _parent

B.   _self

C.   _top

D.   _blank

70: What element specifies a row in a HTML table?

A.   tablerow

B.   tabler

C.   td

D.   tr

E.   trow

71: Which of the following will right-align the content inside a table-cell?

A.   <td:right>

B.   <td valign="right">

C.   <td align="right">

D.   <td right>

72: What does this code render in the browser? <B><I>Text</I></B>

A.   Creates a table cell

B.   Creates italic text

C.   All of these

D.   Creates bold italic text

73: What is the correct HTML tag for inserting a line break?

A.   <br>

B.   <b>

C.   <h1>

D.   <break>

E.   <line>

74: Where can we place the background color tag in your page?

A.   <head>

B.   <body>

C.   <font>

75: When do you use an HTML <i> tag?

A.   To define a list item

B.   To define italic text

C.   To define an input field

D.   To define inserted text

E.   None of these

76: HTML provides web designers with the means to...

A.   edit images online.

B.   react to user keystrokes or mouse actions on the web page.

C.   publish online documents with headings, text, tables, lists, and photos.

D.   manage credit card transactions.

77: Which of the following would be used in table row coding?

A.   <th>

B.   <TR>

C.   tt

D.   <ty>

E.   <thd>

78: Which of the following represents an HTML comment?

A.   <com>This is a comment </com>

B.   <!-- This is a comment -->

C.   <-- This is a comment -->

D.   <comment> This is a comment </comment>

79: Which of these HTML tags represents the smallest heading?

A.   <H0>

B.   <H5>

C.   <H1>

D.   <H6>

80: Which HTML statement creates an <INPUT> element for a single line of text?

A.   <INPUT type="characters" id="firstname">

B.   <INPUT type="text" id="firstname">

C.   <INPUT type="copy" id="firstname">

D.   <INPUT type="string" id="firstname">

81: When are the HTML tags <TH> and <TD> used?

A.   When creating a large text area

B.   When creating text boxes

C.   When creating tables

D.   When creating forms

82: Choose the correct HTML tag for the largest heading ?

A.   <heading>

B.   <h1>

C.   <head>

D.   <h6>

83: To seperate single list items use ?

A.   <ul> and </ul>

B.   <ol> and </ol>

C.   <li> and </li>

84: Colors in plain HTML can be specified using ?

A.   Hexadecimal Colors

B.   Images

C.   Meta tags

85: Which HTML tag do you use to add a horizontal rule?

A.   <NOSHADE>

B.   <HR>

C.   <TR>

D.   <TD>

E.   None of these

86: How can you scale an image on a web page?

A.   By defining width and height attributes of the <IMG> tag

B.   None of these

C.   By using a border attribute

D.   By using a <FORM> tag

87: To add rows to your tables use which tags?

A.   <td> and </td>

B.   <tables > and </tables >

C.   <cr> and </cr>

D.   <ti> and </ti>

E.   <tr> and </tr>

88: Which of these tags are all <table>tags?

A.   <table><tr><tt>

B.   <table><head><tfoot>

C.   <table><tr><td>

D.   <thead><body><tr>

89: The HTML <HEAD> element can contain...

A.   meta information

B.   scripts

C.   All of these

D.   style sheet links

90: CSS appears between which tags?

A.   <c> and </c>

B.   <style> and </style>

C.   <iframe> and </iframe>

D.   <define> and </define>

E.   <div> and </div>

91: To start a numbered list with regular numerals use ?

A.  

B.  

C.  

92: Which tag is used for a paragraph block?

A.   <paragraph>

B.   <pb>

C.   <br>

D.   <p>

93: The DIV element is a

A.   block-level element

B.   middle-level element

C.   High-level element

D.   low-level element

94: What is the correct HTML and XHTML tag for inserting a line break?

A.   <br> and <br />

B.   <break> and <break />

C.   <lb> and <lb />

D.   <breakline> and <breakline />

E.   <tr> and <tr />

95: Which HTML tag do you use to add a video to your web page?

A.   <B>

B.   <FONT>

C.   <MARQUEE>

D.   <I>

E.   None of these

96: Which HTML element makes text bold?

A.   <B>

B.   <BO>

C.   <ST>

D.   <BOLD>

97: Which of the following HTML elements appear last in an HTML page?

A.   </HTML>

B.   </BODY>

C.   </TITLE>

D.   </HEADER>

98: Choose the correct HTML to left-align the content inside a tablecell

A.   <td leftalign>

B.   <td valign="left">

C.   <td align="left">

D.   <tdleft>

99: To change the size of an image in HTML use what?

A.   small and big

B.   height and width

C.   pliers

D.   length and wide

E.   bigger and smaller

100: What does HTML stand for?

A.   Hyperextensible Markup Language

B.   Hypertext Markup Language

C.   Hypertext Manual Language

D.   None of these