HTML Multiple Choice Questions & Answers on The Rules of (X)HTML for Freshers

https://www.computersprofessor.com/2017/11/html-multiple-choice-questions-answers_18.html
1.Which of the following prints bold letters in traditional HTML
i. <B>Go boldly</B> ii. <B>Go boldly</b> iii. <b>Go boldly</B> iv. <b>Go boldly</b>
a) iv
b) i
c) i, ii, iii, and iv
d) both a and b
b) i
c) i, ii, iii, and iv
d) both a and b
Answer: c
Explanation: Traditional HTML is not case sensitive.
2. State true or false.
<img src="test.gif"> and <img src="TEST.GIF"> do not necessarily reference the same image.
a) True
b) False
b) False
Answer: a
Explanation: When referenced from a UNIX-based Web server, where filenames are case sensitive, test.gif and TEST.GIF would be two different files, whereas on a Windows Web server, where filenames are not case sensitive, they would reference the same file.
3. What output dou you expect if the following markup is rendered?
<strong>T e s t o f s p a c e s</strong><br> <strong>T e s t o f s p a c e s </strong><br>
a) T e s t o f s p a c e s
T e s t o f s p a c e s
b) Testofspaces
Testofspaces
c) T e s t o f s p a c e s
T e s t o f s p a c e s
d) not predictable
T e s t o f s p a c e s
b) Testofspaces
Testofspaces
c) T e s t o f s p a c e s
T e s t o f s p a c e s
d) not predictable
Answer: c
Explanation: Any white space between characters displays as a single space.
4. Which of the following options follows content model in HTML?
i.<ul> <p>Option one </p> </ul> ii.<ul> <li>Option two </li> </ul>
a) i
b) ii
c) i and ii
d) None of the mentioned
b) ii
c) i and ii
d) None of the mentioned
Answer: b
Explanation: Content model specifies that certain elements are supposed to occur only within other elements.
5.Which of the following is not an empty element?
a) <hr/> b) <br/> c) <p/> d) None of the mentioned
Answer: c
Explanation: The p tag defines a paragraph. Browsers automatically add some space (margin) before and after each
element.
6.State true or false.
<p></p><p></p><p></p>produces numerous blank lines.
a) True
b) False
b) False
Answer: b
Explanation:
As a block tag, <p> induces a return by default, but when used repeatedly, like <p></p><p></p>,it does not have any effect on document.
7.Which of the following markup is correct?
i. <b><i>is in error as tags cross</b></i> ii. <b><i>is not since tags nest</i></b>
a) i
b) ii
c) i and ii
d) None of the mentioned
b) ii
c) i and ii
d) None of the mentioned
Answer: b
Explanation: Tags in HTML are always nested.
8. Which of the following is not a correct (X)HTML rule?
a) Attributes should be quoted
b) Tags should nest not tag
c) Unused elements may be minimized
d) Unknown attributes are ignored by the browser
Answer: d
Explanation: Browser ignores unknown attributes.
9.Choose the incorrect escape character entity
a) > b) > c) < d) None of the mentioned
Answer: d
Explanation: All are escape characters.
10.Identify the count of mistakes in the following markup.
<html> <head> </head> <body> <li> <ul><p>Hello</p></ul> </li> <br> <hr> </body> </html>
a) 2
b) 3
c) 1
d) 0
b) 3
c) 1
d) 0
Answer: b
Explanation:
<p> should not be in <li> ,<br> and <hr> shpuld be closed.