250+ TOP MCQs on HTML 4.x and XHTML 1.x Character Entities and Answers

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)
c) <”value” entity name>
d) <!”value” entity name>

Answer: a
Clarification: 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?
a) &nnnn;
b)
c) #nnnn;
d) $*nnnn;

Answer: b
Clarification: Numeric character reference uses the format , nnnn represents decimal format. We can also use hhhh in place of nnnn for hexadecimal form and its syntax will be like In XML documents use semicolon is mandatory.

3. What is the format for character entity reference?
a) &name;
b) $name;
c) %name;
d) !name;

Answer: a
Clarification: 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

Answer: c
Clarification: “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?
a) quot
b) apos
c) gt
d) copy

Answer: d
Clarification: 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.

  250+ TOP MCQs on Compatibility Libraries and Answers

6. Which entity is not for both HTML and XML?
a) apos
b) It?
c) cent
d) quot

Answer: c
Clarification: 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?
a) &quot
b) &para
c) &not
d) &acute

Answer: d
Clarification: &acute is character entity and denote small a of latin language. &quot, &para, &not are punctuation character entities. Number representation of &quot is “, &para is ¶, &not is ¬, &acute is ´.

8. Which of the following is not character entity?
a) &aelig
b) &aring
c) &image
d) &ecirc

Answer: c
Clarification: &image is used for imaginary part. &aelig, &aring, &ecirc are all punctuation character. We represents &aelig by the number æ, &aring by å, &image is by ℑ, &ecirc by ê.

9. Which entity is for the arrow?
a) &crarr
b) &zeta
c) &upsih
d) &oelig

Answer: a
Clarification: &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?
a) &harr
b) &clubs
c) &hearts
d) &spades

Answer: a
Clarification: &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 ♠.

  250+ TOP MCQs on Geolocation API and Answers

11. Which of the following entity is for shape?
a) &uarr
b) &loz
c) &rarr
d) &larr

Answer: b
Clarification: &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?
a) &iquest
b) &oline
c) &permil
d) &prime

Answer: a
Clarification: For inverted question mark we used &iquest, &oline is for overline, &permil is for per mille, &prime is for feet sign. In number &iquest is ¿, &olin is ‾, &permil is ‰, &prime is ′.

13. For trade mark sign which entity is used?
a) &shy
b) &trade
c) &sect
d) &real

Answer: b
Clarification: We used &trade for the trademark sign, &shy is used for soft hyphen, &sect for section sign, &real for real part symbol. In number &shy is denoted by ­, &trade by ™, &sect by §, &real by ℜ.

14. For latin letter u with acute which entity is used?
a) &ucirc
b) &ugrave
c) &ucirc
d) &uacute

Answer: d
Clarification: &uacute defines latin letter u with acute, &ucirc is for u with circumflex, &ugrave is for u with a grave.

15. For upward double arrow which entity is used?
a) &uArr
b) &uarr
c) &rarr
d) &darr

Answer: a
Clarification: &uArr is used for an upwards double arrow, &uarr is for upwards arrow, &rarr for rightwards arrow, &darr for downwards arrow.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top