Jump to content

Inline style, why use sparingly?


blogsmith

Recommended Posts

From http://www.w3schools.com/css/css_howto.asp"An inline style loses many of the advantages of style sheets by mixing content with presentation. Use this method sparingly, such as when a style is to be applied to a single occurrence of an element."tags such as <center>, <font> has been depracated, so when one need it, one has to use <span style="">, so this is not a matter of choice. I am wondering, why is the advice given to use this method sparingly?

Link to comment
Share on other sites

You are sort of forced to use stylesheets, so use classes for the elements, that refer to some styling statements in the sheet. :)Inline style styles may be used sparingly, and presentation elements not at all, but what you do may use is stylesheets, they stimulate to extract all style from the document into an (in-) external stylesheet :)

Link to comment
Share on other sites

They say to use it sparingly because one of the major advantages of CSS is that you can edit the one stylesheet to update the entire site. If you use inline styles, you still have to change every element if you want to make changes. That's a reason the font tag was removed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...