Presentation is loading. Please wait.

Presentation is loading. Please wait.

S.MD.FAROOQ M.Tech., [Ph.D] Assistant Professor Department of CSE Santhiram Engineering College.

Similar presentations


Presentation on theme: "S.MD.FAROOQ M.Tech., [Ph.D] Assistant Professor Department of CSE Santhiram Engineering College."— Presentation transcript:

1 S.MD.FAROOQ M.Tech., [Ph.D] Assistant Professor Department of CSE Santhiram Engineering College

2 INTRODUCTION It allow web page designers to improve and change the appearance of their web pages very efficiently. Earlier days- presentation information within web pages. Incereases complexity A style sheet is a document that contains style information about one or more documents written in markup languages. It enables us to control rendering of styles such as fonts, color, size, spacing, margins etc. Cascading Style Sheet (CSS) is a style sheet language that specifies how to incorporate style information in a style sheet. The term Cascading indicates that several style sheets can be blended to present a document on browsers screen.

3 ADVANTAGES Primary intention- separate document presentation from document content written in markup languages. Document writers can concentrate on developing the content(HTML,XHTML,XML), without bothering about visual representation. Style sheet writers can think about the visual presentation of these documents without bothering about the content. The only thing we have to do is to use a separate style for different presentations. The same sheet can also be applied on different documents.-reduce time

4 Content StyleDocument Separation of Style from document

5 ADDING CSS There are four ways to specific style information in a document External Embeded Imported Inline External Style Sheet: Style information is written in separate file and is referenced from an HTML Dcoument. It is useful when the same style is applied on different documents. Example-One style sheet for an entire website External style sheets are cached by most of the browsers, so browsers have to download only documents-faster

6 If the document is HTML, ESS is specified using the HTML tag. Ex: This tag specifies that the style information to be used to display this document is stored in a file named mystyle.css External style sheets are of three types Persistent: one that is always applied Alternate: one of which is selected by the user depending on their choice Preferred: which is applied when no style sheet is selected Note: Current browsers do not support alternate style sheets

7 The attribute “rel” specifies the type of sheet used. Its value is “stylesheet” for persistent and preferred style sheets And “alternate stylesheet” for alternate style sheets. The optional attribute “title” is used to name a stylesheet.(Several alternate style sheets may be grouped under a single “title”) Persistent style sheet is specified by the absence of the title attribute whereas preferred and alternate stylesheets are specified by the presence of the title attribute. Ex:Preferred Style Sheet

8


Download ppt "S.MD.FAROOQ M.Tech., [Ph.D] Assistant Professor Department of CSE Santhiram Engineering College."

Similar presentations


Ads by Google