Test Series - html

Test Number 1/72

Q: State whether the given statement is true or false. !DOCTYPE is case sensitive”.
A. True
B. False
C. 1
D. 0
Solution: XML is a case sensitive while HTML is case insensitive. So the declaration “!DOCOTYPE” is case sensitive in XML and it is not case sensitive in HTML, we can write the “!DOCTYPE” declaration in both lowercase and uppercase, thus both are valid.
Q: Choose the correct statement.
A. In traditional XHTML close tag for some elements is optional but not encouraged
B. In traditional HTML close tag for some elements is optional but not encouraged
C. In both traditional XHTML and HTML close tag for some elements is not optional
D. In both traditional XHTML and HTML close tag for some elements is optional
Solution: In XHTML all elements must always be closed and empty elements also be closed. XHTML close tags are not optional neither they are encouraged. HTML is case insensitive and thus closing tags for some elements including empty elements is optional and is ignored by browsers.
Q: Which of the following XHTML doctype declaration contains all HTML elements and attributes, including presentational and deprecated elements (like font) but not framesets?
A. !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”
B. !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”
C. !DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”
D. 
Solution: The !DOCTYPE declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in. The XHTML doctype declaration “!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”” is of XHTML 1.0 strict, “!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”” is of XHTML 1.0 transitional, “!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”” is of XHTML 1.0 frameset and “” is of XHTML 1.1.
Q: Which of the following is not a difference between HTML and XHTML?
A. Charset in html is “text/html” where as in xhtml it is “application/xml+xhtml”
B. Charset in both html and xhtml is “text/html”
C. Tags and attributes are case-insensitive in HTML but not in XHTML
D. Special characters must be escaped using character entities in XHTML unlike HTML
Solution: HTML is case insensitive while XHTML is case sensitive. In XHTML, special characters can be escaped using character entites but not in HTML. Charset in HTML is “text/html” where as it is “application/xml+xhtml” for XHTML.
Q: What indicates the content in file is HTML when delivered on the network.
A. The extension of the file “.html”
B. The “content-type” header
C. Both “.html” extension and “content-type” header
D. The “content_type” header
Solution: Content-type: header indicates the content in the file is HTML and we can see file content through it when delivered on the network. “.html” is the file extension for HTML.
Q: State whether the given statement is true or false. “We can intermix XHTML and HTML 4.01 documents”
A. True
B. False
C. 1
D. 0
Solution: HTML is not in XML format. You have to make the changes necessary to make the document proper XML before you can get it accepted as XML.
Q: HTML and XHTML stands for ______
A. Hyper Text Markup Language and Extensible HyperText Markup Language
B. Hyper Text Markup Language and Extensible HyperText Marking Language
C. Hyper Text Marking Language and EXtensible HyperText Marking Language
D. Hyper Text Marking Language and Extensible HyperText Markup Language
Solution: HTML stands for “Hyper Text Markup Language” and XHTML stand for “Extensible HyperText Markup Language”.
Q: Choose the correct tag for the largest heading in HTML.
A. h6
B. heading
C. h1
D. head
Solution: Headings in HTML starts from 

to

in which

heading is the largest one and

is smallest one among those. The heading tags are

and
that are used for the creations of headings.
Q: Which of the following are table tags?
A. table, thead, tr, td
B. colspan, table, tr
C. table, tt, tr, td
D. thead, colspan, td, tr
Solution: Table has different tags such as table, thead, tr, td, etc whereas colospan is an attribute of table.
Q: Choose the correct HTML for width attribute and its value.
A. width=80
B. width=”80″
C. WIDTH=”80″
D. WIDTH=80
Solution: Always mention the attribute value in quotes in HTML. It is one of the rule of HTML attributes.

You Have Score    /10