This is a demonstration of an XHTML document (served as application/xhtml+xml
) using a comment within the script
element that
is designed to hide scripts from older HTML user agents. See HTML
comments in scripts for more information
Because the document is parsed with XML rules, rather than HTML rules, the
script element is parsed as #PCDATA
and is therefore commented out.
Therefore, the script will not work.
If the script executed, you would have seen an alert containing "Hello World!".