Test Series - html

Test Number 2/72

Q: Which of the following prints bold letters in traditional HTML?

i. Go boldly
ii. Go boldly
iii. Go boldly
iv. Go boldly
A. iv
B. i
C. i, ii, iii, and iv
D. both iv and i
Solution: Traditional HTML is case insensitive and thus we can write tag/element name either in lowercase or uppercase or both which will be ignored by browser by default.
Q: XHTML is case insensitive and HTML is case sensitive.
A. True
B. False
C. 1
D. 0
Solution: Traditionally XHTML is case sensitive while HTML is case insensitive. In HTML these are ignored by default by browsers.
Q: What output do you expect if the following markup is rendered?

T   e    s   t   o  f  s  p  a  c  e  s
T e s t  o f  s p a c e s
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. T e s t o f s p a c e s T e s t o f s p a c e s
Solution: The strong tag is used to highlight the importance of text/paragraph. 
tag is used for a line break in HTML. Ant white space between characters displays as a single space.
Q: Which of the following options follows content model in HTML?

i.

    Option one

ii.
  • Option two
A. i
B. ii
C. i and ii
D. Neither i nor ii
Solution: Content model specifies that certain elements are supposed to occur only within other elements. The 
    tag which is for unordered list should contain
  • tags which are for list specification. The

    tag is used for paragraph in HTML.

Q: Which of the following is not an empty element?
A. 
B. 
C. 

D. Both
and
Solution: An element is said to be empty if it doesn’t contain any content in it. The 
and
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.

tag contains text/paragraph in it so it’s not an empty element.

Q: State true or false.

produces numerous blank lines.
A. True
B. False
C. 1
D. 0
Solution: As a block tag, 

induces a return by default, but when used repeatedly, like

, it does not have any effect on document.
Q: Which of the following markup is correct?

i. is in error as tags cross
ii. is not since tags nest
A. i
B. ii
C. i and ii
D. Neither i nor ii
Solution: 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  tag is nested in  tag then  must be closed after closing of the  tag.
Q: Which of the following is not a correct (X)HTML rule?
A. Attributes should be quoted
B. Tags should not nest tag
C. Attribute minimization is forbidden
D. Unknown attributes are not ignored by the browser
Solution: Rules of XHTML are as- 1) XHTML elements must be properly nested
2) XHTML elements must always be closed
3) XHTML elements must be in lowercase
4) XHTML documents must have one root element
5) Attribute names must be in lower case
6) Attribute values must be quoted
7) Attribute minimization is forbidden
Q: Choose the incorrect escape character entity.
A. >
B. >
C. <
D. &st;
Solution: Character escapes in markup is to represent any Unicode character in HTML, XHTML or XML using only ASCII characters. There are different types of escape character entity in HTML. Some of them are > which is used for greater than(>) , > is basically a entity number which is used for greater than(>), < stands for less than(<), etc. There doesn’t exist any &st escape character entity in markup.
Q: Identify the count of mistakes in the following markup.





    • Hello



  • A. 2
    B. 3
    C. 1
    D. 0
    Solution: We can write 

    tag in
      tag as there is no such rule or else limitation. The tags
      and
      are closed by default in browser.

      You Have Score    /10