+ 15
HTML comments <!...> Or <!--...--> ?
As per many textbook's HTML comments are as follows <! comment section > but in sololearn and some other websites it is as follows <!-- comment section --> which is the correct one????
10 Answers
+ 13
The correct HTML comment is the 2nd one <!-- ....... -->
+ 9
It should be <!--(blah blah blah)--> For some reason, maybe because they dont use traditional HTML
+ 5
First, since Internet Explorer deviates so much, their conditional comments are technically invalid for XML compliance standards as well as HTML's.
Now my message: To be more correct, possibly off-topic, following up on the other two comments I see, I'm going to use my knowledge of XML in this (just in case you want an XML parser to validate the comments...).
Comments start with "<!--" and ends with the FIRST instance of "-->" that is found, so nesting comments will produce invalid code. There must be absolutely ZERO instances of "--" between the start and there must be ZERO extra "-" after the start or before the end. Examples for the start of a comment."<!---" three dashes/hyphens or more is invalid, but "<!-- -" having a space or other valid character BEFORE a dash/hyphen spree is okay.
+ 4
this one is correct comment<!--comment-->
+ 4
thé second one <!-- blablabla -->
+ 4
the second option Is the correct <!--...-->
+ 3
in html <!--comments allow--> is valid comment
+ 3
@Malcolm Crowley, your iOS device is automatically converting them from - - to either â or â which means you should look in the system's settings and disable any auto-correct or similar features while using SoloLearn.
+ 2
Iâm stuck in the program at this test, valid answer coming back as invalid. </!â comments â>. For some reason on my ipad pro, the hyphens are entered look like a line as in the instructions i typed.
0
<!__This is comment__