Which of the following form is correct to show a ‘comments’ in the HTML…

2024

Which of the following form is correct to show a ‘comments’ in the HTML language?

  1. A.

    <-- This is a comment -->

  2. B.

    <-- This is a comment -!>

  3. C.

    <!-- This is a comment -!>

  4. D.

    <!-- This is a comment -->

Attempted by 163 students.

Show answer & explanation

Correct answer: D

The correct HTML comment syntax begins with `<!--` and ends with `-->`. Therefore the valid form is `<!-- This is a comment -->`.

Explore the full course: Up Lt Grade Assistant Teacher 2025