Test Series - html

Test Number 31/72

Q: What is the correct format of numeric character reference?
A. &nnnn;
B. &#nnnn;
C. #nnnn;
D. $*nnnn;
Solution: 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.
Q: Syntax of entity declaration is ___________
A. 
B. 
C. <”value” entity name>
D. 
Solution: Character entity reference declaration is done by syntax  in HTML and in XML. This syntax is define in Document Type Definiton(DTD).
Q: What is the format for character entity reference?
A. &name;
B. $name;
C. %name;
D. !name;
Solution: The format for character entity reference is &name; name is case-sensitive alphanumeric string and semicolon is necessary.
Q: Which entity is not defined in XML?
A. quot
B. apos
C. gt
D. copy
Solution: 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.
Q: Which entity is not for both HTML and XML?
A. apos
B. It?
C. cent
D. quot
Solution: 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.
Q: Which entity is not for punctuation character?
A. "
B. 
C. ¬
D. ´
Solution: ´ is character entity and denote small a of latin language. ", ¶, ¬ are punctuation character entities. Number representation of " is ", ¶ is ¶, ¬ is ¬, ´ is ´.
Q: Which of the following is not character entity?
A. æ
B. å
C. &image
D. ê
Solution: &image is used for imaginary part. æ, å, ê are all punctuation character. We represents æ by the number æ, å by å, &image is by ℑ, ê by ê.
Q: Which entity is for the arrow?
A. &crarr
B. &zeta
C. &upsih
D. &oelig
Solution: &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 œ.
Q: Which entity is not for shape?
A. &harr
B. &clubs
C. &hearts
D. &spades
Solution: &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 ♠.

You Have Score    /9