// This is a comment/* This is a comment */<!-- This is a comment --><comment>This is a comment</comment>
Correct answer: C
- A — Incorrect: Double forward slashes are commonly used for comments in languages such as JavaScript, not HTML comment syntax.
- B — Incorrect: This is a comment syntax used in CSS and several other languages, not HTML.
- C — Correct: HTML comments begin with
<!--and end with-->. - D — Incorrect: comment is not a standard HTML element used to create source comments.
Question 2: Which character reference displays the less-than symbol?
><&©
Correct answer: B — <
- A — Incorrect:
>represents the greater-than symbol. - B — Correct:
<represents the less-than symbol. - C — Incorrect:
&represents an ampersand. - D — Incorrect:
©represents the copyright symbol.
Question 3: Which character does & represent?
- Less-than symbol
- Greater-than symbol
- Ampersand
- Copyright symbol
Correct answer: C — Ampersand
- A — Incorrect: The less-than symbol uses
<. - B — Incorrect: The greater-than symbol uses
>. - C — Correct:
&represents the ampersand character. - D — Incorrect: The copyright symbol uses
©.
Question 4: What is the correct UTF-8 declaration for an HTML document?
<meta encoding="UTF-8"><meta charset="UTF-8"><charset>UTF-8</charset><html charset="UTF-8">
Correct answer: B
- A — Incorrect: encoding is not the attribute used for the HTML meta charset declaration.
- B — Correct:
<meta charset="UTF-8">declares the document's character encoding. - C — Incorrect: charset is not a standard HTML element.
- D — Incorrect: charset is not declared on the html root element in this way.
Question 5: What does Unicode primarily provide?
- A CSS layout system
- A standard for identifying characters using code points
- A method for compressing images
- A database query language
Correct answer: B
- A — Incorrect: CSS controls presentation and layout.
- B — Correct: Unicode assigns code points to characters used across many writing systems and for symbols.
- C — Incorrect: Image compression is unrelated to Unicode's primary purpose.
- D — Incorrect: SQL is a language used for working with relational databases.
Question 6: What does the numeric character reference © represent?
- Registered trademark symbol ®
- Copyright symbol ©
- Euro symbol €
- Check mark ✓
Correct answer: B — Copyright symbol ©
- A — Incorrect: The registered symbol has Unicode code point U+00AE.
- B — Correct: Decimal 169 corresponds to Unicode code point U+00A9, the copyright symbol.
- C — Incorrect: The euro symbol has code point U+20AC.
- D — Incorrect: The check mark has code point U+2713.