diff --git a/htmlcssguide.xml b/htmlcssguide.xml
index 738c050..6308ee2 100644
--- a/htmlcssguide.xml
+++ b/htmlcssguide.xml
@@ -1,9 +1,8 @@
-
- Revision 2.1
+ Revision 2.2
Hooray! Now you know you can expand points to get more
- details. Alternatively, there’s a “toggle all” at the
+ details. Alternatively, there’s a “toggle all” at the
top of this document.
- Omitting the protocol—which makes the URL - relative—prevents mixed content issues and results in + Omitting the protocol—which makes the URL + relative—prevents mixed content issues and results in minor file size savings.
- Don’t use tabs or mix tabs and spaces for indentation. + Don’t use tabs or mix tabs and spaces for indentation.
- All code has to be lowercase: this applies to element names,
+ All code has to be lowercase: This applies to element names,
attributes, attribute values (unless
text/CDATA
), selectors, properties, and
property values (with the exception of strings).
@@ -173,7 +172,7 @@
- Use comments to explain code: what does it cover, what + Use comments to explain code: What does it cover, what purpose does it serve, why is respective solution used or preferred?
@@ -181,7 +180,7 @@ (This item is optional as it is not deemed a realistic expectation to always demand fully documented code. Mileage may vary heavily for HTML and CSS code and depends on the - project’s complexity.) + project’s complexity.) @@ -230,11 +229,15 @@<!DOCTYPE html>
.
- (It is recommended to use HTML, as text/html
. Do not use
+ (It’s recommended to use HTML, as text/html
. Do not use
XHTML. XHTML, as application/xhtml+xml
,
lacks both browser and infrastructure support and offers
less room for optimization than HTML.)
+ Although fine with HTML, do not close void elements, i.e. write
+ <br>
, not <br />
.
+
- Use elements (sometimes incorrectly called “tags”) for what
+ Use elements (sometimes incorrectly called “tags”) for what
they have been created for. For example, use heading
elements for headings, p
elements for
paragraphs, a
elements for anchors, etc.
@@ -310,7 +313,7 @@
Providing alternative contents is important for
- accessibility reasons: a blind user has few cues to tell
+ accessibility reasons: A blind user has few cues to tell
what an image is about without @alt
, and other
users may have no way of understanding what video or audio
contents are about either.
@@ -369,9 +372,9 @@
<link rel="stylesheet" href="grid.css" media="screen">
<link rel="stylesheet" href="print.css" media="print">
<h1 style="font-size: 1em;">HTML sucks</h1>
- <p>I’ve read about this on a few sites but now I’m sure:
+ <p>I’ve read about this on a few sites but now I’m sure:
<u>HTML is stupid!!1</u>
- <center>I can’t believe there’s no way to control the styling of
+ <center>I can’t believe there’s no way to control the styling of
my website without doing everything all over again!</center>
The only exceptions apply to characters with special meaning
in HTML (like <
and &
) as
- well as control or “invisible” characters (like no-break
+ well as control or “invisible” characters (like no-break
spaces).
(This approach may require a grace period to be established - as a wider guideline as it is significantly different + as a wider guideline as it’s significantly different from what web developers are typically taught. For - consistency and simplicity reasons it is best served + consistency and simplicity reasons it’s best served omitting all optional tags, not just a selection.)
(If you run into issues around whitespace between list items
- it is acceptable to put all li
elements in one
+ it’s acceptable to put all li
elements in one
line. A linter is encouraged to throw a warning instead of
an error.)