CHAPTER 2 CSS (PART-1)
Purpose of CSS • Cascading Style Sheets or CSS allows to specify styles for the visual elements of the website. • CSS helps to keep the information content of a document separate from the details of how to display it. – HTML is used to describe the information content of the document and not the style. – CSS describes the style of the elements in the document and not its content. • The detail of how to display the document is known as Style. • Style specify the appearance of particular page elements on the screen. • Keeping the style separate from the content helps us to : – Avoid duplication in coding – Use the same content with different styles for different purposes – Easy maintenance of code • Using CSS, we can set all element types to appear in a style as per our choice.
Syntax of CSS • The syntax of CSS consists of special symbols known as rules. • A CSS rule has two main parts: – A Selector – One or more declaration • The selector is the HTML element on which you want to apply the style. • Declaration consists of a property associated with the HTML element used in selector and its corresponding value. • The general syntax of CSS is defined as : • selector { property:value} • h1 { color: green } • Kompozer uses CSS by default, Click Tools->Preferences. – Select General category on the left side of the window. – Select the checkbox use CSS styles instead of HTML elements and attributes.
Advantage of CSS • CSS allows us to set the format of the website without changing the underlying structure. • By separating the layout and format properties of the website form its underlying logical structure, we can make changes to the website without the fear of accidentally changing the data. • The CSS has less code compared to that in HTML • Thus the web pages will load faster. • Using CSS makes website designing quick and efficient.
Disadvantage of CSS • The CSS compatibility varies with different browsers. – Stylesheet features are not supported by the browser and style cannot be displayed as per the users design.
THANK YOU

Std 12 Computer Chapter 2 Cascading Style Sheets and Javascript(Part 1 CSS)

  • 1.
  • 2.
    Purpose of CSS •Cascading Style Sheets or CSS allows to specify styles for the visual elements of the website. • CSS helps to keep the information content of a document separate from the details of how to display it. – HTML is used to describe the information content of the document and not the style. – CSS describes the style of the elements in the document and not its content. • The detail of how to display the document is known as Style. • Style specify the appearance of particular page elements on the screen. • Keeping the style separate from the content helps us to : – Avoid duplication in coding – Use the same content with different styles for different purposes – Easy maintenance of code • Using CSS, we can set all element types to appear in a style as per our choice.
  • 3.
    Syntax of CSS •The syntax of CSS consists of special symbols known as rules. • A CSS rule has two main parts: – A Selector – One or more declaration • The selector is the HTML element on which you want to apply the style. • Declaration consists of a property associated with the HTML element used in selector and its corresponding value. • The general syntax of CSS is defined as : • selector { property:value} • h1 { color: green } • Kompozer uses CSS by default, Click Tools->Preferences. – Select General category on the left side of the window. – Select the checkbox use CSS styles instead of HTML elements and attributes.
  • 4.
    Advantage of CSS •CSS allows us to set the format of the website without changing the underlying structure. • By separating the layout and format properties of the website form its underlying logical structure, we can make changes to the website without the fear of accidentally changing the data. • The CSS has less code compared to that in HTML • Thus the web pages will load faster. • Using CSS makes website designing quick and efficient.
  • 5.
    Disadvantage of CSS •The CSS compatibility varies with different browsers. – Stylesheet features are not supported by the browser and style cannot be displayed as per the users design.
  • 6.