This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “HTML5: Beyond Markup”.
1. How do we write comments in HTML5?
a) <!……>
b) <…….!>
c) </…….>
d) </……/>
View Answer
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.
2. Which one is correct syntax?
a) <p id=”1td”>
b) <p id=”td”>
c) <p id=”%td”>
d) <p id=”#td”>
View Answer
Explanation: <p id=”td”> is the correct syntax for id type declaration. Id attribute’s value should start with a letter or an underscore. We cannot use any number or other character for defining name of the id.
3. Which of the following is not example of block element?
a) <h1>
b) <ul>
c) <p>
d) <a>
View Answer
Explanation: The elements which always appear to start on a new line in browser are known as block level elements. Examples are <h1>,<ul>,<li> and <p>.
4. What does semantic markup not define?
a) provides extra information
b) where an emphasis is placed in a sentence
c) meaning of an acronym
d) that describes paragraphs
View Answer
Explanation: < Semantic markup> which provides extra information, such as where emphasis is placed in a sentence, that something you have written is a quotation, the meaning of acronyms etc.
5. How many levels of headings HTML has?
a) 6
b) 3
c) 7
d) 2
View Answer
Explanation: HTML has six “levels ” of headings.<h1> is used for main headings,<h2> is used for subheadings. There is no other levels other than <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
6. What is the size of content of an <h1> element?
a) Smallest
b) Largest
c) Medium
d) Anything between smallest and largest
View Answer
Explanation: The contents of an <h1> element is the largest and the contents of an <h6> element is the smallest. Rest of <h2>, <h3>, <h4>, <h5> lies in between largest and smallest.
7. What is the tag used for making character appearance bold?
a) <b>content</b>
b) <i>content</i>
c) <u>content</u>
d) <br>content</br>
View Answer
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.
8. For writing chemical formula of water which tag will be used?
a) <sup>
b) <sub>
c) <br/>
d) <ul>
View Answer
Explanation: The <sub> element is used to contain characters that should be subscript. It is commonly used with foot notes or chemical formulas. E.g. H20, <sup> is use for superscript, <br> is for horizontal break, <ul> is for unordered list.
9. which tag will be used For raising number to a power?
a) <sup>
b) <sub>
c) <br/>
d) <ul>
View Answer
Explanation: The <sup> element is used to contain characters that should be superscript. It is commonly used with foot notes or chemical formulae. E.g. X2 , <br> is for break, <ul> is for unordered list.
10. What is the use of <hr/> tag?
a) To create horizontal rule between sections
b) To create a line break
c) To create vertical rule between sections
d) For making content appearance italics
View Answer
Explanation: To create a break between themes-such as change of topic in a book or a new scene in a play-you can add a horizontal rule between sections using <hr/> tag
11. Which of the following is not an empty element.
a) <hr/>
b) <br/>
c) <sup>
d) <img/>
View Answer
Explanation: There are a few elements that do not have any words between an opening and closing tag. They are known as empty elements. An empty element usually has only one tag. Before the closing angled bracket of an empty element, there will often be a space and a forward slash.
12. Which attribute is not essential under <iframe>?
a) src
b) height
c) width
d) frameborder
View Answer
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.
13. Which is not the attribute of <meta> element?
a) description
b) keywords
c) robots
d) seamless
View Answer
Explanation: <meta> element contains information about web page. Description attribute contains the description of the web page, keywords contains the list of comma separated words, robots decide to add pages to search results.
14. Copyright symbol can be included by _________
a) <
b) ©
c) &
d) >
View Answer
Explanation: HTML code has some characters that are reserved so for using those on the page one need to know “escape” characters. If you want to add a copyright symbol to the web page they can use © or ©.
15. Attributes that allow to identify particular element are ____________
a) <div> and <span>
b) <meta>
c) id and class
d) <iframes>
View Answer
Explanation: The id and class attributes are useful in identifying particular elements. <iframe> element is for creating frames in web page, <div> and <span> are inline elements, metadata is provided by <meta> tag.
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Practice MCA MCQs
- Check HTML Books
- Apply for Computer Science Internship
- Practice Computer Science MCQs
- Check Computer Science Books