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

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
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
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
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
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
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
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
Answer: b

Explanation:
<p> should not be in <li> ,<br> and <hr> shpuld be closed.

Related

Data Structure Questions and Answers on Fibonacci using Recursion for Freshers

1. Suppose the first fibonnaci number is 0 and the second is 1. What is the sixth fibonnaci number? a) 5b) 6c) 7d) 8 Answer: a Explanation: The sixth fibonnaci number is 5. 2. Which of the fo...

Java Multiple Choice Questions & Answers on Type Conversions, Promotions and Castings for Freshers

1. Which of these is necessary condition for automatic type conversion in Java? a) The destination type is smaller than source type.b) The destination type is larger than source type.c) The destina...

HTML Multiple Choice Questions & Answers on Basic HTML and XHTML

1. State whether the given statement is true or false. !DOCTYPE is case sensitive” a) Trueb) False Answer: b Explanation: In XML it is while in HTML it isn’t. 2. Choose the correct statement a)...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item