Matt Brundage

Emil Stenström on inline styles

Emil Stenström weighs in with why Inline CSS should not be allowed in strict doctypes:

Inline CSS goes against all the logic involved in the idea of two distinct doctypes. Why should you want to include design information inside of a document that you just explicitly stated would separate the two?

Remember that the word cascading appears in CSS. Inline styles, while not esthetically pleasing, nevertheless allow for economy of code.

If, for instance, you implement a style that appears only once on only one page, than an inline style makes sense. Or, if you find yourself implementing that style in multiple areas of your site, then by all means, place it in an external document.

The beauty of cascading style sheets is that a style can be implemented on a single tag, a single page, or multiple pages, depending upon your desired level of specificity.

2 Responses to “Emil Stenström on inline styles”

  1. Ok, the link got removed. Here it is:

    friendlybit.com/html/inline-css-should-not-be-allowed-in-strict-doctypes/#comment-1648