You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These guidelines have been assembled following an examination of emerging practices, ideas and existing styleguides, namely:
3
+
These guidelines have been assembled following an examination of emerging practices, ideas and existing styleguides, and include items from:
4
4
5
5
1.[Google's html styleguide](http://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml)
6
6
7
7
### Protocol
8
8
9
-
Omit the protocol portion (http:, https:) from URLs pointing to images and other media files, style sheets, and scripts unless the respective files are not available over both protocols.
9
+
Omit the protocol portion (http:, https:) from URLs pointing to images and other media files, style sheets, and scripts unless they are not available over both protocols.
10
10
11
11
This prevents mixed content issues and results in minor file size savings.
12
12
@@ -17,29 +17,28 @@ This prevents mixed content issues and results in minor file size savings.
All html shoudl be lowercase: This applies to HTML element names, attributes, attribute values (unless text/CDATA), CSS selectors, properties, and property values (with the exception of strings).
22
-
23
-
20
+
### Type attributes
21
+
Do not use type attributes for style sheets (unless not using CSS) and scripts (unless not using JavaScript).
All html should be lowercase; element names, attributes, attribute values (unless text/CDATA), CSS selectors, properties, and property values (with the exception of strings).
33
33
34
34
```html
35
-
<!-- TODO: add active item class -->
36
-
<ul>
37
-
<li>Home</li>
38
-
<li>Blog</li>
39
-
</ul>
35
+
<!-- Good -->
36
+
<imgsrc="joomla.png"alt="Joomla">
37
+
<!-- Bad -->
38
+
<AHREF="/">Home</A>
40
39
```
41
40
42
-
##Html formatting
41
+
### Formatting
43
42
Use a new line for every block, list, or table element, and indent every such child element.
44
43
45
44
```html
@@ -56,4 +55,27 @@ Use a new line for every block, list, or table element, and indent every such ch
56
55
<li>Home</li>
57
56
<li>Blog</li>
58
57
</ul></div>
58
+
```
59
+
60
+
### Semantics
61
+
Use HTML according to its purpose. For example, use heading elements for headings, p elements for paragraphs, a elements for anchors, etc.
62
+
63
+
Using HTML according to its purpose is important for accessibility, reuse, and code efficiency reasons.
0 commit comments