IT237 Week 2 CSS Style Sheets Essay

Submitted By poonad38
Words: 369
Pages: 2

The three ways of inserting a cascading style sheet (CSS) are External, Embedded, and Inline. External style sheets are used when the web designer wants to add the specific style to multiple pages. To do so, the web designer puts a link to a separate page, on each webpage or document, using the <link> tag. The linked sheet has the code for the style and is saved with a .css extension. A pro for this type of CSS would be allowing the web designer to add style to multiple pages easily, while a con would be that the page loads slower due to the browser needing to load the extra external style sheet.
An embedded cascading style sheet is used when a document or page has a specific or different style than the rest. The code for this type of Cascading Style Sheet is written in the head section as well, but inside the <style> tag. A pro for this type of cascading style sheet would be that the web designer is able to make each document or page have a unique style to it. The biggest con for this embedded cascading style sheets would be maintenance and updating. The web designer would have different code on each page to look through, unlike an external style sheet, where there is a separate page containing the style code for every page or document.
An inline style is used to specify styles for each relevant tag. For example, to use an inline style to change header 1, it would be typed as:
<h1 style=”color:green;font-size:20pt;”>Header 1</h1>
This method