Basic Html(Html ) Questions and Answers

Question 1. Which of the following is not a difference between HTML and XHTML
  1.    Charset in html is “text/html” where as in xhtml it is “application/xml+xhtml”
  2.    None of the mentioned
  3.    Tags and attributes are case-insensitive in HTML but not in XHTML
  4.    Special characters must be escaped using character entities in XHTML unlike HTML
Explanation:-
Answer: Option B. -> None of the mentioned
All other options are correct.

Question 2. State whether the given statement is true or false. !DOCTYPE is case sensitive”
  1.    True
  2.    False
Explanation:-
Answer: Option B. -> False
In XML it is while in HTML it is not.

Question 3. Choose the correct statement of HTML
  1.    In traditional XHTML close tag for some elements is optional but not encouraged
  2.    In traditional HTML close tag for some elements is optional but not encouraged
  3.    None of the mentioned
  4.    In both traditional XHTML and HTML close tag for some elements is optional
Explanation:-
Answer: Option B. -> In traditional HTML close tag for some elements is optional but not encouraged
In HTML close tags are optional but not in XHTML.

Question 4. State whether the given statement is true or false. “We can intermix XHTML and HTML 4.01 documents”
  1.    True
  2.    False
Explanation:-
Answer: Option B. -> False
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.

Question 5. What indicates the content in file is HTML when delivered on the network.
  1.    The extension of the file “.html”
  2.    The “content-type” header
  3.    Both “.html” extension and “content-type” header
  4.    None of the mentioned
Explanation:-
Answer: Option B. -> The “content-type” header
Content-type: header indicates the content in file is html.

Question 6. Which of the following is true if the property value of a name-value pair added by an element with an itemprop attribute is a data element ?
  1.    The value is the value of the element’s value attribute, if it has one, or the empty string otherwise.
  2.    The value is the item created by the element.
  3.    The value is the element’s datetime value.
  4.    None of the mentioned
Explanation:-
Answer: Option A. -> The value is the value of the element’s value attribute, if it has one, or the empty string otherwise.
If the element is a data element, the value is the value of the element’s value attribute, if it has one, or the empty string otherwise.

Question 7. The goal of microdata is to create a unified way to define the data in a way any web crawler or reader implementation can read it.
  1.    True
  2.    False
Explanation:-
Answer: Option A. -> True
Microdata allows the user to create “custom” elements (sort of), to give a specific meaning to them.

Question 8. Y default, iOS adds ____________ effects to icons.
  1.    reflective shine
  2.    square corners and reflective shine
  3.    rounded corners and reflective shine
  4.    apple trademark
Explanation:-
Answer: Option C. -> rounded corners and reflective shine
Most of these icons are beautifully designed, and after Apple introduced a new meta tag named apple-touch-icon you can now display website icons on the iOS home screen when you bookmark a site.

Question 9. Which method takes a string that contains an unordered set of unique space-separated tokens that are case-sensitive, representing types?
  1.    document.getItems
  2.    element.itemProp
  3.    collection.namedItem
  4.    none of the mentioned
Explanation:-
Answer: Option A. -> document.getItems
When called, the method must return a live NodeList object containing all the elements in the document, in tree order, that are each top-level microdata items whose types include all the types specified in the method’s argument, having obtained the types by splitting the string on spaces.

Question 10. Which of the following applications/software can be used to create a favicon?
  1.    Unity
  2.    Adobe Photoshop
  3.    Dreamweaver
  4.    VLC
Explanation:-
Answer: Option B. -> Adobe Photoshop
To create a favicon, we can use any graphic editor program in the market such as Adobe Photoshop or Fireworks.