AllBestEssays.com - All Best Essays, Term Papers and Book Report
Search

Cascading Style Sheets

Essay by   •  January 20, 2013  •  Essay  •  433 Words (2 Pages)  •  1,471 Views

Essay Preview: Cascading Style Sheets

Report this essay
Page 1 of 2

Cascading Style Sheets, also referred to as, CSS are created so developers are able to separate the design from the content. This process allows HTML to do the markup of the content and the developer does not have to worry about the layout. CSS are separated into one of three different categories, which are as follows: external, embedded, and inline CSS. Each type of CSS has pros and cons, it really depends upon the situation.

Inline CSS are applied in the middle of the HTML code and only apply to whichever line it is inserted into. Inline CSS also has the highest priority which means it will override any other CSS that is already in place for that individual line. Since developers do not have to worry about creating a new document or edit CSS in the head of the document, it makes Inline CSS quick and easy to use. However, the ease of Inline CSS can also be considered a disadvantage. If using this CSS, every single line of code will have to be edited. Inline CSS cannot perform complex styles like the visited, active, or link color of an anchor tag.

Embedded CSS are placed at the head of the document and will only affect the page that the style is placed on. Embedded CSS can have a higher priority than External CSS if they are placed after the link to the external style. Just as Inline CSS there are no external files to load as the style is placed directly on the page affected. There are two large disadvantages of Embedded CSS. One is that Embedded CSS can only affect the page the style is placed upon. The second is the increased load time because the style has to be loaded and parsed for every page viewed.

The third type of CSS is External CSS. This is the most preferred method because it keeps the CSS separate from the HTML by placing the CSS in a separate file. This enables the developer to change the look of several pages without coding each page; one would only have to provide the page with a "link" tag. However, External CSS can become very large in a short amount of time because the style is never removed even if the page is. These large style sheets can cause slow upload times because the entire style sheet has to be loaded before the page is displayed.

References

Bojack, H. (2008). New perspectives on blended HTML, XHTML, and CSS: Introductory. Boston: Course Technology. Retrieved: April 6, 2011

...

...

Download as:   txt (2.3 Kb)   pdf (55.6 Kb)   docx (9.4 Kb)  
Continue for 1 more page »
Only available on AllBestEssays.com
Citation Generator

(2013, 01). Cascading Style Sheets. AllBestEssays.com. Retrieved 01, 2013, from https://www.allbestessays.com/essay/Cascading-Style-Sheets/40278.html

"Cascading Style Sheets" AllBestEssays.com. 01 2013. 2013. 01 2013 <https://www.allbestessays.com/essay/Cascading-Style-Sheets/40278.html>.

"Cascading Style Sheets." AllBestEssays.com. AllBestEssays.com, 01 2013. Web. 01 2013. <https://www.allbestessays.com/essay/Cascading-Style-Sheets/40278.html>.

"Cascading Style Sheets." AllBestEssays.com. 01, 2013. Accessed 01, 2013. https://www.allbestessays.com/essay/Cascading-Style-Sheets/40278.html.