SE Submission

Tuesday, December 28, 2010

Inline CSS: Inline, Embedded, External CSS

We can write CSS as following types:
a. Inline css
b. Embedded / Internal css
c. External css

a. Inline CSS:
Which style are uses inside the relevant tag of the content that is Inline CSS.

b. Embedded / Internal CSS:
Internal styles is use in the head section of an HTML page, by using the

c. External CSS:
External style sheet is totally isolate form the html page. External css is define in the out side of the html page, which extensiton is .css. To use this style we just 've to use a link on the html page.


Disadvantage of inline CSS:
1. You cannot reuse the styles anywhere else.
2. The html markup of the page becomes cumbersome, and tough to parse for the naked eye.
3. Since, they are not stored at a single place, they are tough to be edited
4. This approach does not provide consistency across your application. The inline styles on elements can cause a major headache.
5. It does not provide you with the browser cache advantage. The files are repeatedly downloaded by the client on every request. Instead, consider using External style sheets.
6. Inline styles take precedence over page-level style declarations and external style sheets. So you could accidentally override styles that you did not intend.
7. It's impossible to style pseudo-elements and -classes with inline styles. For example, with external and internal style sheets, you can style the visited, hover, active, and link color of an anchor tag.

I recommend not using inline styles for your Web pages because they cause problems and make the pages a lot more work to maintain. The only time I use them is when I want to check a style quickly during development. Once I've got it looking right for that one element, I move it to my external style sheet.

0 comments:

Post a Comment

  ©SEO and Online Marketing in Bangladesh - Todos os direitos reservados.

Template by Dicas Blogger | Topo