HTML Questions & Answers – HTML 4.x and XHTML 1.x Character Entities

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>
View Answer

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

Answer: b
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?
a) &name;
b) $name;
c) %name;
d) !name;
View Answer

Answer: a
Explanation: The format for character entity reference is &name; name is case-sensitive alphanumeric string and semicolon is necessary.
advertisement
advertisement

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
View Answer

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

Answer: d
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.
Note: Join free Sanfoundry classes at Telegram or Youtube

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

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

Answer: d
Explanation: &acute is character entity and denote small a of latin language. &quot, &para, &not are punctuation character entities. Number representation of &quot is &#34, &para is &#182, &not is &#172, &acute is &#180.
advertisement

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

Answer: c
Explanation: &image is used for imaginary part. &aelig, &aring, &ecirc are all punctuation character. We represents &aelig by the number &#230, &aring by &#229, &image is by &#8465, &ecirc by &#234.

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

Answer: a
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 &#8629, for &zeta is &#950, for &upsih is &#978, for &oelig is &#339.
advertisement

10. Which entity is not for shape?
a) &harr
b) &clubs
c) &hearts
d) &spades
View Answer

Answer: a
Explanation: &harr is for left right arrow, &clubs for club suit, &hearts for heart suit, &spades for spade suit. Number representation of &harr is &#8596, &clubs is &#9827, &hearts is &#9830, &spades is &#9824.

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

Answer: b
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 &#8593, for &loz is &#9674, for &rarr is &#8594, for &larr is &#8592.

12. Which entity is for inverted question mark?
a) &iquest
b) &oline
c) &permil
d) &prime
View Answer

Answer: a
Explanation: 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 &#191, &olin is &#8254, &permil is &#8240, &prime is &#8242.

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

Answer: b
Explanation: 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 &#173, &trade by &#8482, &sect by &#167, &real by &#8476.

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

Answer: d
Explanation: &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
View Answer

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.