Bruno Ribeiro | Resources | Don’t include styling on your HTML document

Don’t include styling on your HTML document

HTML was never intended to contain tags for formatting a document, so we’ll store our External Style Sheets in a separate CSS file.

Don’t use any attribute in your tag in replacement of proper CSS properties. Don’t do any formatting in HTML to change font size, color, case, background, alignment, width, height, etc.

Anything that you want to do to change the look of the page, it’s supposed to be done in the CSS file. Use HTML only to establish hierarchy.

Use classes if you need them. But think twice before creating unnecessary classes.

A common mistake is to use the style attribute in the tags. Don’t.

Even worse mistake is to use the deprecated tags <center> or <font>