HTML Basic
- What output do you expect if the following markup is rendered?
<strong>INTERVIEWMANIA</strong>
</br>
<strong>INTER VIEW MANIA
</strong>
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The strong tag is used to highlight the importance of text/paragraph. <br> tag is used for a line break in HTML. Ant white space between characters displays as a single space.
- Which of the following options follows content model in HTML?
i.<ul>
<p>First </p>
</ul>
ii.<ul>
<li>Second </li>
</ul>
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Content model specifies that certain elements are supposed to occur only within other elements. The <ul> tag which is for unordered list should contain <li> tags which are for list specification. The <p> tag is used for paragraph in HTML.
- Which of the following is not an empty element?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
An element is said to be empty if it doesn’t contain any content in it. The <hr/> and <br/> tag which is used for a horizontal line and line break respectively, doen’t contains any content in it and thus are called empty elements in HTML. <p> tag contains text/paragraph in it so it’s not an empty element.
- State true or false.
<p></p><p></p><p></p>blank lines.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
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.
- 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>
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In markup, tags can be nested. The first tag who is going to nest other tag must end after that nested tag which means if <i> tag is nested in <b> tag then <b> must be closed after closing of the <i> tag.