CSS INTRODUCTION: ================= CSS ==> Cascading Style Sheets One of the Language for UI development to define the styles to the HTML content Access HTML Elements Features: ========= 1) Property based language every property can define with value Syntax: property-name : value; (key : value) 2) not case sensitive language CSS Versions: ============= CSS-1 ==> Nov 1996 CSS-2 ==> Jul 1998 CSS-2.1 ==> Jun 2011 CSS-3 ==> 2013 Nov ======================================= Ways to define CSS: =================== ==> 3-ways: 1) Inline Stylesheet 2) Internal Stylesheet 3) External Stylesheet 1) Inline Stylesheet ===================== ==> can use to define the style for the only one particular HTML element at a time. ==> style attribute Syntax: Content Inline CSS

UI Development

HTML

Tag Names

Attributes

CSS

Selectors

Properties

JavaScript

Statements

Disadvantage: ============= 1) Using the Inline CSS, we can define the style for only one element at a time. 2) To add the same style among multiple elements, we should re-write the same code. ================================= 2) Internal Stylesheet: ======================= ==> to define the block of style which are commonly defined among more than one element at a time without re-writing, we can use "Internal Stylesheet". ==> To define the Internal stylesheet: we can use " Internal Stylesheet

UI Development

HTML

HTML Includes:
Tags ==> some of tags are paired and some of tags are Unpaired.
Attributes

CSS

CSS Includes:
Selectors for access the HTML Elements
Properties for defining the styles.

JavaScript

JavaScript contains:
Statements with tokens
To define the functionality on webpage.

Disadvantage: ============= ==> Using the internal stylesheet, we can define the style within the same webpage. ==> to add the same style of one webpage among multiple pages of same website, Internal stylesheet can required the re-writing of the code. ========================================= 3) External Stylesheet: ======================= Website ==> multiple webpages ==> we need to define the styles externally in ".css" file and apply those external styles to our webpages using "" tag. 1) create the css file Syntax: file-name.css 2) write the styles into .css file 3) link that css file html file External Stylesheet

Ashok IT