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) True
b) False
Answer: b

Explanation: In XML it is while in HTML it isn’t.
2. 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) None of the mentioned
d) In both traditional XHTML and HTML close tag for some elements is optional
Answer: b

Explanation: In HTML close tags are optional but not in XHTML.
3. 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) None of the mentioned
Answer: b

Explanation: 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.
4. 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) None of the mentioned
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
Answer: b

Explanation: All other options are correct.
5. 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) None of the mentioned
Answer: b

Explanation: Content-type: header indicates the content in file is html.
6. State whether the given statement is true or false. “We can intermix XHTML and HTML 4.01 documents”

a) True
b) False
Answer: b

Explanation: 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.
7.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) None of the mentioned
Answer: a

Explanation: HTML and XHTML are abbreviated as mentioned in the correct option.
8. Choose the correct tag for largest heading in HTML.

a) h6
b) heading
c) h1
d) head
Answer: c

Explanation: h1 is the largest while h6 is the smallest by convention for headings in HTML.
9. Which of the following are table tags?

a) table, thead, tr, td
b) colspan, table, tr
c) table, tt, tr, td
d) none of the mentioned
Answer: a

Explanation: Other options include table row elements and attributes.
10.Choose the correct XHTML for width attribute and its value.

a) width=80
b) width=”80″
c) WIDTH=”80″
d) WIDTH=80
Answer: b

Explanation: Always mention the attribute value in quotes and XHTML is case sensitive.

Related

Java Multiple Choice Questions & Answers on Java.lang – Object & Math Class for Freshers

1. Which of these class is superclass of all other classes? a) Mathb) Processc) Systemd) Object Answer: d Explanation: The object class class is superclass of all other classes. 2. Which of thes...

CSS Multiple Choice Questions & Answers on CSS and (X)HTML Elements Fundamentals for Freshers

1. Which of the following elements are block and inline elements, respectively, that have no particular rendering? a) divb) spanc) box-modeld) both (a) and (b) Answer: d Explanation: The div elem...

C Programming Questions and Answers on Pointers and Arrays for Freshers

1. What is the output of this C code? #include void main() { int a[3] = {1, 2, 3}; int *p = a; printf("%p\t%p", p, a); } a) Same ad...

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