This set of HTML Multiple Choice Questions & Answers focuses on “HTML 4.x and XHTML 1.x Character Entities”.
1. Syntax of entity declaration is ___________
a) <!entity name “value”>
b) <entity name “value”!>
c) <”value” entity name>
d) <!”value” entity name>
Explanation: Character entity reference declaration is done by syntax <!entity name “value”> in HTML and in XML. This syntax is define in Document Type Definiton(DTD).
2. What is the correct format of numeric character reference?
Explanation: Numeric character reference uses the format &#nnnn, nnnn represents decimal format. We can also use hhhh in place of nnnn for hexadecimal form and its syntax will be like &#xhhhh; In XML documents use &#xnnnn; semicolon is mandatory.
3. What is the format for character entity reference?
Explanation: The format for character entity reference is &name; name is case-sensitive alphanumeric string and semicolon is necessary.
4. For entity which term is used by XML?
a) character entity reference
b) numeric character reference
c) predefined entities
d) character and numeric entity reference
Explanation: “character entity reference” term is not used by XML instead XML defines five “predefined entities” which are & [&], < [<], > [>], " [“] and ' [‘].
5. Which entity is not defined in XML?
Explanation: There is only five entity in XML that are predefined and those are quot, It, gt, apos, amp. Copy is used in HTML, quot, apos, gt was first introduced by XHTML 1.0. Copy was first introduced by HTML 3.2. Unicode code point for copy is U+00A9.
6. Which entity is not for both HTML and XML?
Explanation: cent is only HTML character entity. Other entities like quot, lt, gt, apos, amp are for the use of both HTML and XML. The Unicode point in Hex for apos is U+0027, for lt is U+003C, for cent is U+00A2, for quot is U+0022.
7. Which entity is not for punctuation character?
Explanation: ´ is character entity and denote small a of latin language. ", ¶, ¬ are punctuation character entities. Number representation of " is ", ¶ is ¶, ¬ is ¬, ´ is ´.
8. Which of the following is not character entity?
Explanation: &image is used for imaginary part. æ, å, ê are all punctuation character. We represents æ by the number æ, å by å, &image is by ℑ, ê by ê.
9. Which entity is for the arrow?
Explanation: &crarr represents a downwards arrow with corner leftwards. &zeta is for greek small letter zeta, &upsih is for greek upsilon, &oelig is for latin small letter o. Number for &crarr is ↵, for &zeta is ζ, for &upsih is ϒ, for &oelig is œ.
10. Which entity is not for shape?
Explanation: &harr is for left right arrow, &clubs for club suit, &hearts for heart suit, &spades for spade suit. Number representation of &harr is ↔, &clubs is ♣, &hearts is ♦, &spades is ♠.
11. Which of the following entity is for shape?
Explanation: &loz is for the shape lozenge, &uarr is for upward arrow, &rarr for rightwards arrow, &larr for leftwards double arrow. The number for &uarr is ↑, for &loz is ◊, for &rarr is →, for &larr is ←.
12. Which entity is for inverted question mark?
Explanation: For inverted question mark we used ¿, &oline is for overline, &permil is for per mille, &prime is for feet sign. In number ¿ is ¿, &olin is ‾, &permil is ‰, &prime is ′.
13. For trade mark sign which entity is used?
Explanation: We used &trade for the trademark sign, ­ is used for soft hyphen, § for section sign, &real for real part symbol. In number ­ is denoted by ­, &trade by ™, § by §, &real by ℜ.
14. For latin letter u with acute which entity is used?
Explanation: ú defines latin letter u with acute, û is for u with circumflex, ù is for u with a grave.
15. For upward double arrow which entity is used?
Explanation: &uArr is used for an upwards double arrow, &uarr is for upwards arrow, &rarr for rightwards arrow, &darr for downwards arrow.
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.