Avoid <b>
ed and <br>
eakfast markup
Think about why you want something to appear a certain way; what does it mean? Your markup can and should convey meaning, even to someone who cannot see your page. Semantic markup makes our pages more accessible to everyone, including search engines.
When you italicize something, is that because you want to emphasize it, <em>
, or because it’s the title of a book, <cite>
?
If something is bold, it should probably be marked up as <strong>
.
If you want a linebreak after something, chances are it should be marked up as a header element. If it’s not a header, is it part of a class
that occurs throughout your site? If that’s the case then use CSS instead of <br>
.
.foo {display:block}
To learn more, see Bed and BReakfast markup (B&BR) by Tantek Çelik.