Ccs Style

Submitted by: Submitted by

Views: 318

Words: 380

Pages: 2

Category: Science and Technology

Date Submitted: 05/20/2011 01:29 PM

Report This Essay

CSS Description Types

IT/237 - INTRO TO WEB DESIGN II

An external style is one in which you write the CSS code in a document separate from the HTML for the Web page. External style sheets can format some or all of the pages at your Web site. As such, external style sheets are the preferred method for writing CSS code (Bojack, 2008). External CSS is the way to go, it has all of the advantages of embedded CSS, but it allows you to share styles across multiple pages. Pro: easy to maintain and reuse across websites with more than one page. Con: makes an extra HTTP request pr. file = more resources used in the Firewalls/routers

An embedded style is one in which you write the CSS code in the <head> section of an HTML document. Embedded styles apply only to the one document in which they are embedded (Bojack, 2008). Embedded CSS centralizes the styles for the page, but it does not allow you to share styles across pages without copying the text of the embedded style and pasting it in each unique page on your site. Pro: same as above regarding prototype, but easier to cut out of the final prototype and put into an external file when templates are done. Con: some email clients does not allow styles in the head as the head-tags is remove by most webmail clients.

An inline style is one that is written in the <body> section of an HTML document. Inline styles format just a section of text within the <body> text (Bojack, 2008). Inline CSS is generally bad. It is much easier to modify the style of a page when all the styles are located in one central location, which inline CSS does not offer. It is easy for quickly prototyping styles, but should not be used in production, especially since it often leads to duplicating styles. Pro: Great for quick fixes/prototyping and simple tests without having to swap forth and back between CSS document and the actual HTML file. Con: Fills up HTML space/takes bandwidth, not reusable across pages - not even...