styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

htmlcssguide error : no comments above doctpye

Open ronnievsmith opened this issue 9 years ago • 2 comments

Under HTML Validity it says:

<!-- Recommended -->
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test</title>
<article>This is only a test.</article>

However, W3C validator says nothing should go above the doctype declaration, not even a comment.

ronnievsmith avatar Jul 03 '16 21:07 ronnievsmith

Test

This is only a test.

seastarrrr avatar Jun 04 '24 13:06 seastarrrr

I would like to help

trottiemcqueen avatar Jun 05 '24 20:06 trottiemcqueen

the <!-- Recommended --> isn't meant to be copied over literally. if you look at all the code snippets, they have a comment at the top to show whether the snippet is/isn't recommended. imo it's kind of obvious that the comment shouldn't be retained literally when you see that every example is written this way.

arguably they aren't needed in any of the examples due to the coloring, but it helps with people who can't see the colors.

i'm inclined to leave it as-is.

vapier avatar Jul 09 '24 03:07 vapier