Bad
<p><small>Copyright © 2014 W3C<sup>®</sup></small></p>
Good
<p><small>Copyright © 2014 W3C<sup>®</sup></small></p>
Escape &
, <
, >
, "
, and '
with named character references
Bad
<h1>The "&" character</h1>
Good
<h1>The "&" character</h1>
To ensure that special characters such as &
, <
, >
, "
, and '
are displayed correctly in web pages, they must be escaped with named character references. These named character references consist of an ampersand (&), followed by a sequence of letters and numbers that represent the specific character, and then a semicolon (;).
For example, the named character reference for the less-than symbol <
is <
, and the named character reference for the ampersand symbol &
is &
. By using named character references, we can ensure that special characters are displayed correctly in all browsers, regardless of the encoding used.
6. Omitting type attributes for scripts and stylesheets
Omit the type
attributes when including style sheets and scripts.
According to the HTML5 specification, there is usually no need to specify a type
attribute because text/css
and text/javascript
are the respective default values for CSS and JavaScript files."
Bad
<link rel="stylesheet" href="https://www.google.com/css/maia.css" type="text/css">
Good
<link rel="stylesheet" href="https://www.google.com/css/maia.css">