Tuesday 8 October 2013

Assess different implenetation styles of CSS


In this blog I will be assessing the different implementation styles of CSS, these includes inline, internal also known as embedded and external.

INLINE

Inline CSS adds styling to single HTML elements using a type of attribute of an element called <style>.

Advantages of Inline

1. With Inline you don't need to create an external document, as well as this you don't need to edit a new element in the head of your document. Inline are therefore very easy to add and can save a lot of time.

2. Web designers use the inline style sheet when they are first working on a new project. This is because it is easier to scroll up in the source instead of changing the source file. More importantly inline can be used to debug pages if there is an error and it is hard to fix.

3. Inline loads faster, this means that Internal CSS websites load much faster than External CSS websites and therefore also loads quicker on mobiles.

Disadvantages of Inline

1. The Inline style must be used for every webpage you want it on so it can be much more time consuming if you are creating a large web site. For example if you wanted all your headings to have a font of "Verdana" you would have to add an inline < p> < /p> tag in your documents. This will also mean that the load time for the website is longer when the user opens the site.

INTERNAL

An internal style sheet is basically all the tags within the code of the web page, for example <head>, and <body>. These tags visually do not show anything however they inform the browser that there will be some sorts off CSS on the web page.

Advantages of Internal

1. Internal styles don't need to be applied to every webpage. If you want all your headings or paragraphs to have the family font "verdana" you would have to add an Inline style <p> tag within your internal style document. This can benefit you if you want to keep all the fonts the same as you just need to do it once.

Disadvantages of Internal

1.One of the biggest disadvantages of internal is that if the user wants to make changes to the WebPages they would have to amend every page, so for example if there are 20 pages on a website then the user would have to make changes to all the 20 pages separately, which can be very time consuming.


EXTERNAL

An external style sheet allows you to change the appearance (e.g. the layout, the colour) of all pages within the web page. External style sheets are mainly used for when having to apply many appearances to many pages on a web page/page's.

Advantages of External

1. Because the styling text is within a different document it means that the file sizes of the pages will be reduced quite considerably. This also means the structure and content is much easier to read by the developers.

2. CSS lets you to display your website according to the HTML standards. This can be done without changing any looks or designs on your site itself.

3. Because the style is separated from the HTML page and is put within a CSS style sheet it means that there is less code within the page but more importantly it makes it more easy to work with and less confusing as the HTML is separated with the style sheet.

Disadvantages of External

1. If you have a small website it could be more complicated to use external style sheets because they can increase quite fast and if you have deleted web pages it can be confusing as you wouldn't know which style sheet is needed.

Conclusion

Depending on the type of the website, the programmer would choose which type of css they want to use. For example a website with only one page without colour and media would use internal CSS. On the other hand if a website has multiple pages with media and colours, the programmer would use external.

Ref

/http://www.expression-web-tutorial.com/Types_CSS_Styles.html

Date- 17/12/2013

Time- 09:33 pm

http://vineetgupta22.wordpress.com/2011/07/09/inline-vs-internal-vs-external-css/

Date- 17/12/2013

Time- 09:53 pm

No comments:

Post a Comment