Skip to content

Commit 732ca14

Browse files
author
ABaldwinHunter
committed
Add html styleguide with initial rule
First rule: Since quotes are sometimes required when specifying HTML attribute values, quote consistently to reduce thought and diffs.
1 parent 0f95bbc commit 732ca14

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ course of your current work. Do not change code *only* to fix style.
2626
This repository includes written guides & relevant linter configuration for the
2727
following languages:
2828

29-
- [Ruby](ruby/README.md)
30-
- [JavaScript](javascript/README.md)
3129
- [Haskell](haskell/README.md)
30+
- [HTML](markup/README.md)
31+
- [JavaScript](javascript/README.md)
32+
- [Ruby](ruby/README.md)

html/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# HTML
2+
3+
- Always use quotes when specifying attribute values.
4+
5+
```html
6+
<!-- Good -->
7+
<td class="foo"></td>
8+
<td class="foo bar"></td>
9+
10+
<!-- Bad -->
11+
<td class=foo></td>
12+
```
13+
14+
Reasoning: since quotes are required in some situations, quote consistently
15+
to minimize thought points + diffs.

0 commit comments

Comments
 (0)