Skip to content

Courses / HTML5 Mastery: Complete Beginner to Advanced Course / HTML Comments & Characters

681 people viewed this

HTML Comments & Characters

  1. // This is a comment
  2. /* This is a comment */
  3. <!-- This is a comment -->
  4. <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?

  1. &gt;
  2. &lt;
  3. &amp;
  4. &copy;

Correct answer: B — &lt;

  • A — Incorrect: &gt; represents the greater-than symbol.
  • B — Correct: &lt; represents the less-than symbol.
  • C — Incorrect: &amp; represents an ampersand.
  • D — Incorrect: &copy; represents the copyright symbol.

Question 3: Which character does &amp; represent?

  1. Less-than symbol
  2. Greater-than symbol
  3. Ampersand
  4. Copyright symbol

Correct answer: C — Ampersand

  • A — Incorrect: The less-than symbol uses &lt;.
  • B — Incorrect: The greater-than symbol uses &gt;.
  • C — Correct: &amp; represents the ampersand character.
  • D — Incorrect: The copyright symbol uses &copy;.

Question 4: What is the correct UTF-8 declaration for an HTML document?

  1. <meta encoding="UTF-8">
  2. <meta charset="UTF-8">
  3. <charset>UTF-8</charset>
  4. <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?

  1. A CSS layout system
  2. A standard for identifying characters using code points
  3. A method for compressing images
  4. 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 &#169; represent?

  1. Registered trademark symbol ®
  2. Copyright symbol ©
  3. Euro symbol €
  4. 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.

Question 7: What is the difference between a Unicode code point and UTF-8?

Rate this course

5.0 · 1 rating

Stars show on this course. Your written note stays private.

Your stars