Can comments in HTML contain special characters?
- No, they cannot contain any special characters.
- Only if they are within a CDATA section.
- Yes, but they must be encoded.
- Yes, except for the sequence "--".
HTML comments can contain special characters; however, they cannot include the character sequence "--" (double hyphen) as it signifies the end of the comment. Including "--" within a comment might cause the comment to terminate prematurely or result in a parsing error.
Loading...
Related Quiz
- When anchor links point to a specific section of a page, the ______ attribute is used in the destination element.
- Which attribute is used to specify a shortcut key to activate/focus an element?
- Can the "style" attribute override the styles defined in external stylesheets?
- To target a specific cell in a table with CSS, the ______ pseudo-class can be particularly useful.
- You are developing a scientific web page, and you need to display chemical equations. How would you use HTML tags to format the subscript and superscript in chemical equations?