Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Lecturer Notes On IT2353 Unit 2

Lecturer Notes On IT2353 Unit 2

Ratings: (0)|Views: 186 |Likes:
Published by Shankar

More info:

Published by: Shankar on Mar 21, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





UNIT IIStyle Sheets: CSS-Introduction to Cascading Style Sheets-Features-Core Syntax-StyleSheets and HTML Style Rle Cascading and Inheritance-Text Properties-Box ModelNormal Flow Box Layout-Beyond the Normal Flow-Other Properties-Case Study.Client-Side Programming: The JavaScript Language-History and Versions IntroductionJavaScript in Perspective-Syntax-Variables and Data Types-Statements-Operators-Literals-Functions-Objects-Arrays-Built-in Objects-JavaScript Debuggers.
Style Sheets:
a style sheet is a
 or form that defines the
of a
. Style sheets areuseful because you can use the same style sheet for many documents. style sheets are alsocalled templates.
Cascading Style Sheets:
Cascading Style Sheets, or CSS, are a series of instructions that specify howmarkup elements should appear on a Web page.
Cascading Style Sheets (CSS) is a
used to describe the
(the look and formatting) of a document written in a
CSS is designed primarily to enable the separation of document content (written inHTML or a similar markup language) from document presentation, includingelements such as the
, and 
Features of CSS:
CSS allows “separation” between the information contained in a document and itspresentation.
Changes in the presentation can be made without disturbing the information of thedocument.
Style sheet allows user to decide the style of presentation and it is defined inseparate file.
Single style sheet used for all the pages of the web site and all the pages will haveconsistent look and feel.
Syntax of CSS:
A style sheet consists of a list of rules.
Each rule or rule-set consists of one or more selectors and a declaration block.
A declaration-block consists of a list of declarations in braces.
Each declaration itself consists of a property, a colon (
), a value, then a semi-colon (
Collection of style rules called “rule set”.
Each rule set consist of two parts , “selector string” followed by “declarationblock”.<style type= “text/css”>h1{Font-family:arial;Font-color:red;}</style>
CSS Rules
A CSS rule defines the appearance attributes that HTML will acquire and so change thedisplay of the document content in the browser.All style rules are composed of three parts:1. Selectors: Selectors are string identifiers that defines to what HTML element the ruleis applied. A selector can be an HTML tag, a class selector or an ID selector.2. Properties: Properties are predefined attributes that can be applied3. Values: Values are the specific setting chosen for a property.4. The combination of a property and the associated value is called a definition.
Selector stringDeclaration Block Valu
Rule Definition: properties and valuesAfter the selector has been specified, the definition provides the properties and values tobe used with the selector.
CSS Types:
CSS effects document changes as style rules. Style rules can be implemented in threeways:1. Inline:defines style rules set within individual HTML tags using the styleattribute. Inline styles rules override any other influencing style rule. For example:Syntax:<H1 style="color: blue; font-style: italic"> I'm blue</H1>2. Embedded:defines style rules set within the HTML <HEAD> section of a document,using the STYLE tag. Embedded styles rules can include variety of HTMLelements which will be applied to all the specified tags that are used within the<BODY> of the document. For example:Syntax:<STYLE type="text/css">H1 H2 H3 {color: green; text-transform:uppercase;}</STYLE>3. External:defines the use of a separate text file containing the style rules. Externalstyle files have a css file extension name. External style sheets are implementedwith the use of the <LINK> tag, and provide formatting standards that can beapplied as a template to any number of documents at a Web site. The style iscalled from within the HTML document using the <LINK> tag: syntax:<LINK href="somefile.css" rel="stylesheet" type="text/css"> 

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->