Skip to content

Best 30+ Interview Questions on HTML MCQ

Here I provide some knowledgeable articles of Interview Questions on HTML MCQ…

Interview Questions on HTML MCQ on Text

Interview Questions on HTML MCQ on Text

Interview Questions on HTML MCQ on Text

Which element of HTML is used for line breaks?

a) <lr>

b) <line>

c) <break>

d) <br>

Ans d) <br> 

 

Which element does HTML allow you to mark a part of the text as selected?

a) <planetext>

b) <samp>

c) <q>

d) <mark>

Ans d) <mark>   

 

What error does the following code contain?

<p dir = “ltr”><strong>better</strong>late<p>than never.</p>

a) one <p> cannot be inserted inside another <p>

b) <strong> element cannot be placed inside <p>

c) No end tag </p>

d) Invalid “dir” attribute.

Ans a) one <p> cannot be inserted inside another <p> 

 

Which element does HTML display the text with all the spaces in it?

a) <pre>

b) <p>

c) <div>

d) <wbr>

Ans  a) <pre>

 

With which element HTML can you specify a place where it is possible to do line breaking?

a) <shy>

b) <break>

c) <nobr>

d) <wbr>

Ans  a) <wbr>

 

Which element has the largest text size?

a) <a>

b) <p>

c) <strong>

d) <h2>

Ans d) <h2> 

 

Which element of HTML is used to emphasize the text?

a) <a>

b) <dfn>

c) <em>

d) <i>

Ans c) <em> 

 

How to write text in subscript?

a) H<sup>3</sup>0

b) H<sub>2</sub>0

c) <bottom>2</bottom>0

d) H<down>2</down>

Ans b) H<sub>2</sub>0 

 

Which element of HTML sets the importance of the text?

a) <strong>

b) <bold>

c) <i>

d) <b>

Ans a) <strong> 

 

Which element of HTML is used for creating text paragraphs?

a) <section>

b) <span>

c) <div>

d) <p>

Ans d) <p>   

 

Which element of HTML indicates that a text is an abbreviation?

a) <title>

b) <abbr>

c) <acronym>

d) <cite>

Ans b) <abbr> 

 

Which element of HTML is used for variables in the text from computer programs?

a) <var>

b) <tt>

c) <code>

s) <xmp>

Ans a) <var> 

 

Which element of HTML sets bold text?

a) <bold>

b) <em>

c) <b>

d)<strong>

Ans c) <b> 

 

What element of HTML is used to create a block with a quote?

a) <cite>

b) <q>

c) <blockquote>

d) <quote>

Ans c) <blockquote>   

 

Interview Questions on HTML Basics MCQ

Interview Questions on HTML Basics MCQ

Interview Questions on HTML Basics MCQ

1. How to specify the number 3.14 as the value of the “value” attribute?

a) value = “3,14”

b) value = “3.14”

c) value = “3^14”

d) value = “3/14”

Ans b) value = “3.14”

 

2. Which symbol separates one attribute from the other in an element?

a) Quote

b) Semicolon

c) Space

d) Hyphen

Ans c) Space

 

3. What is a boolean attribute?

a) An attribute that does not have a value.

b) An attribute whose value can change.

c) An attribute whose value is 1 or 0.

d) An attribute whose value is “yes” or “no”

Ans a) An attributes that does not have a value.

 

4. Which organization is developing web standards?

a) Mozilla

b) Apple

c) World wide web consortium

d) Google

Ans c) World Wide Web Consortium

 

5. How is the abbreviation of HTML?

a) Hyperspeed exTensible Markup Language

b) HyperText Markup Language

c) Hyperlinks and text markup language

d) Home tool markup language.

Ans b) HyperText Markup Language 

 

6. What is start tag?

a) <input>

b) <br>

c) </p>

d) <body>

Ans d) <body>

 

7. In which program is the HTML code written?

a) Graphics editor

b) Browser

c) Text Editor

d) PDF Editor

Ans c) Text Editor

 

8. How to set a width of 60 percent for an element?

a) width = “60px”

b) width = “60p”

c) width = “60%”

d) width = “60”

Ans c) width = “60%” 

 

9. How to write attribute ad its value correctly?

a) name = “keywords”

b) name = [keywords]

c) name = <<keywords>>

d) name = \keywords\

Ans a) name = “keywords”

 

10. In which program are web pages viewed?

a) Browser

b) PDF editor

c) Graphics editor

d) Text Editor

Ans a) Browser 

 

11. What is <!doctype> used for?

a) To display the contents of a webpage.

b) To specify the document type.

c) Stores the document metadata.

d) Indicates where the HTML code begins

Ans b) To specify the document type

 

12. How to write a comment in HTML?

a) // Comment

b) <!–Comment–>

c) # Comment #

d) /* Comment */

Ans b) <!– Comment –> 

 

Interview Questions on HTML MCQ on Forms

Interview Questions on HTML MCQ on Forms

Interview Questions on HTML MCQ on Forms

1. Which element creates a multi-line text field?

a) <pre>

b) <textarea>

c) <select>

d) <input>

Ans b) <textarea>

 

2. Which attribute should be added to <input> to make the text field read-only?

a) read-write

b) disabled

c) read-only

d) readonly

Ans d) readonly   

 

3. Which element creates form?

a) <fieldset>

b) <label>

c) <form>

d) <input>

Ans c) <form> 

 

4. Which field is suitable for entering integers?

a) <input type = “integers”>

b) <input type = “number”>

c) <input type = “num”>

d) <input type = “string”>

Ans b) <input type = “numbers”>

 

5. What code creates a field for sending multiple files?

a) <select name = “file” multiple>

b) <file multiple>

c) <upload multiple>

d) <input type = “file” multiple>

Ans d) <input type = “file” multiple> 

 

6. Which attribute is required for <form>?

a) enctype

b) action

c) method

d) There are no required attributes

Ans d) There are no required attributes 

 

7. Which attribute is required for <textarea>?

a) form

b) name

c) cols

d) There are no required attributes

Ans d) There are no required attribures 

 

8. Which attribute makes a form field mandatory?

a) Valid

b) required

c) access-key

d) must have

Ans b) required 

 

9. Which element creates a drop-down list in the form?

a) <optgroup>

b) <select>

c) <list>

d) <option>

Ans b) <select> 

 

10. How to create a field for selecting day of the week?

a) <input type = “calender”>

b) <input type = “week”>

c) <input type = “day”>

d) <input type = “date”>

Ans d) <input type = “date”> 

 

Interview Questions on HTML MCQ on Lists

Interview Questions on HTML MCQ on Lists

Interview Questions on HTML MCQ on Lists

1. Oliver wants to create a numbered list starting with 3. What should he write first?

a) <ol start = “3”>

b) <ol value = “3”>

c) <ol min = “3”>

d) <ol begin = “3”>

Ans a) <ol start = “3”

 

2. What element is used to create an ordered list?

a) <ul>

b) <ol>

c) <dl>

d) <li>

Ans b) <ol>

 

3. What element is allowed to be specified directly within <ul>?

a) <p>

b) <ul>

c) <ol>

d) <li>

Ans d) <li>

 

4. How to create the numbering on the list to appear in descending order (3,2,1)?

a) <ol opposite>

b) <ol reversed>

c) <ol back>

d) <ol inverted>

Ans b) <ol reversed>

 

5. What element is used to create an unordered list?

a) <li>

b) <ul>

c) <dl>

d) <ol>

Ans b) <ul>

 

6. Which attribute of <ol> element allows you to start a list from a given number?

a) start

b) value

c) reversed

d) begin

Ans a) start

 

7. Which element creates a term in a description list?

a) <dt>

b) <df>

c) <dd>

d) <dl>

Ans d) <dl> 

 

8. Which element creates a list of descriptions?

a) <dd>

b) <dt>

c) <dl>

d) <df>

Ans c) <dl>

 

9. Which item creates a separate item in an unordered list?

a) <li>

b) <ol>

c) <option>

d) <ul>

Ans a) <li>

 

10. How to start the list item from number 5?

a) <li begin = “5”>

b) <li step = “5”>

c) <li value = “5”>

d) <li start = “5”>

Ans c) <li value =”5″>

 

Interview Questions on HTML MCQ on Tables

1. Is text inside the <th> aligned horizontally as default?

a) Left

b) Center

c) Right

d) Justify

Ans b) center

 

2. Which HTML element adds a header cell to the table?

a) <thead>

b) <caption>

c) <tr>

d) <th>

Ans d) <th>

 

3. Which attribute of <td> element is used to span the table columns?

a) span

b) rowspan

c) col

d) colspan

Ans d) colspan

 

4. Which attribute of <td> element is used to span the table rows?

a) rowspan

b) span

c) colspan

d) row

Ans a) rowspan

 

5. Which HTML element creates the table?

a) <tr>

b) <table>

c) <td>

d) <tbody>

Ans b) <table> 

 

6. Which HTML element is used to add a row to the table?

a) <row>

b) <thead>

c) <td>

d) <tr>

Ans d) <tr>

 

7. Is cell data aligned vertically as default?

a) At the top.

b) At the bottom.

c) The baseline text.

d) In the middle.

Ans d) In the middle   

 

8. How to display a text inside element <th>?

a) Normal

b) Underlined

c) Bold

d) Italic

Ans c) Bold 

 

9. Which HTML element is used to add a table footer?

a) <tfoot>

b) <caption>

c) <tbody>

d) <thead>

Ans a) <tfoot>

 

 

Leave a Reply

Your email address will not be published.

%d bloggers like this: