Elements
- Add closing tags to elements that aren't self-closing. 1
- Don't add the forward slash for self-closing elements. 2
- Avoid unnecessary markup, such as surrounding a block element in
a
<div>
. 3 - Use lowercase, not uppercase.
<div>
. 3required
, do not
need a value. 1class
id
name
data- attributes
for, href, value, etc.
<bold>
and
<hr>
.@include
js-
prefixed classes. 1!important
unless absolutely
necessary. Restrict its use to utility classes prefixed with a
u-
. 2position
,
z-index
...)display
, margin
...)font
, color
...)background
, opacity
...)rem
over px
values. 1