SlideShare a Scribd company logo
1 of 23
Disclaimer:This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
Cascading Style Sheets (CSS)

           Ashwin Anand V
           Email:ashwinanand99@gmail.com
           Facebook id:ashwinanand99@gmail.com
The Breakdown

• All web pages can be broken down into
   bucketized content areas
• These areas can updated by changing the
   code on every page,
  - or -
• By using cascading style sheets!
Cascading Style Sheets
• Cascading Style Sheets (CSS) is a style sheet
  language used to describe the presentation
  (that is, the look and formatting) of a document
  written in a markup language. Its most common
  application is to style web pages written in
  HTML and XHTML, but the language can be
  applied to any kind of XML document
• Created by: CSS was created by Håkon Wium Lie
  and Bert Bos and was adopted as a W3C
  Recommendation in late 1996.
What Are Cascading Style Sheets?
• A standards-based method for controlling the
  look and feel of XML content.
• Comprised of Rules to control elements in the
  document.
• Designed to separate formatting from the
  content while being flexible and scalable
What Can CSS Do?
• Text formatting
• Element sizing
• Element positioning
• Change link attributes
• Cursor manipulation
• Most importantly, CSS can support the control
  of hundreds or thousands of documents from a
  single control file
• This makes your life much easier when it is time
  to make updates
Types of CSS
• Three CSS implementations
  – Inline
     • Affects only the element applied to

  – Embedded
     • Affects only the elements in a single file

  – External
     • Linked to an unlimited number of files
HTML Page Structure
                              Document (HTML)
<HTML>                         Head
 <HEAD>                          Title Text
  <TITLE>Title Text</TITLE>
 </HEAD>
                               Body

 <BODY>                          H1 Heading

  <H1>H1 Heading</H1>
                                   Paragraph 1
  <P>Paragraph 1</P>
  <P>Paragraph 2</P>
                                   Paragraph 2
</BODY>
</HTML>
Inline CSS
Use the STYLE attribute

<p>This is normal text</p>
<p><b>This is bold text</b></p>

<p style=“font-weight: bold”>This is bold
  text</p>
Embedded CSS
• Added to the <HEAD> area of file
• Use <STYLE> element

<HEAD>
 <TITLE>New Topic1</TITLE>
 <STYLE>P{font-weight:bold}</STYLE>
</HEAD>
External CSS

   • The <LINK> element is used to attach a CSS
     document to an HTML document

<HEAD>
<TITLE>New Topic1</TITLE>
<LINK HREF="example.css" REL="StyleSheet" >
</HEAD>
What is Cascading?
The three CSS types combine at run time to
  render the page.

Order of precedence
• Inline styles

• Embedded style sheets

• Linked (external) style sheets
Style Rules
Inline       style=“font-weight: bold”
                            Property   Value
Embedded/
                      H1 {font-weight: bold}
External
                 Selector
                              Declaration
    H1 {font-weight: bold; color:black; }
Creating a Cascading Style Sheet
body {color: #000000;
                                      <html >
    background: #F1F2EC;                <head>
    font-size: 8pt;                       <link href="test.css" rel="stylesheet" />
                                        </head>
      font-family: Verdana,             <body>
      Arial,Helvetica, Sans Serif;}       <h1>Heading 1 Text</h1>
h1 {color: #0D10E5;                       <p>A normal paragraph</p>
                                          <h2>Heading 2 Text</h2>
    font-size: 12pt;}                     <p>Another normal paragraph</p>
h2 {color: #040677;                       <p>This paragraph will be a tip.</p>
                                        </body>
    font-size: 10pt;}
                                      </html>
p {margin-bottom: 16px;}
CLASS attribute
• Class Syntax:

  – In a style sheet:
     P.myclass { color:blue;}

  – In a page:
     <P CLASS=“myclass”>Text</P>
Creating a Cascading Style Sheet
body {color: #000000;
       background: #F1F2EC;
       font-size: 8pt;                                        <html >
       font-family: Verdana, Arial, Helvetica, Sans Serif;}     <head>
h1   {color: #002000;                                             <link href="test.css" rel="stylesheet" />
       font-size: 12pt;}                                        </head>
h2   {color: #002b00;                                           <body>
       font-size: 10pt;}                                          <h1>Heading 1 Text</h1>
                                                                  <p>A normal paragraph</p>
p    {margin-bottom: 16px;}
                                                                  <h2>Heading 2 Text</h2>
p.tip {color: #BEF5BF;
                                                                  <p>Another normal paragraph</p>
       font-weight: bold;
                                                                  <p class=“tip”>This paragraph will be a     tip.</p>
       background-color: #696969;
       padding-left: 0.8em;                                     </body>
       padding-right: 0.8em;                                  </html>
       padding-bottom: 0.3em;
       padding-top: 0.3em;
       border-bottom-color: #000000;
       border-bottom-style: Solid;
       border-bottom-width: 1px;
       border-top-color: #000000;
       border-top-style: Solid;
       border-top-width: 1px;}
• If this presentation helped you, please visit
  our page facebook.com/baabtra and like it.
  Thanks in advance.

• www.baabtra.com | www.massbaab.com |ww
  w.baabte.com
Thank you
Contact Us

More Related Content

What's hot

Web programming css
Web programming cssWeb programming css
Web programming cssUma mohan
 
CSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorCSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorKelly Kellum
 
Web topic 14 cascading style sheets
Web topic 14  cascading style sheetsWeb topic 14  cascading style sheets
Web topic 14 cascading style sheetsCK Yang
 
Castro Chapter 8
Castro Chapter 8Castro Chapter 8
Castro Chapter 8Jeff Byrnes
 
Need for css,introduction to css & basic syntax wt
Need for css,introduction to css &  basic syntax wtNeed for css,introduction to css &  basic syntax wt
Need for css,introduction to css & basic syntax wtMeet1020
 
Introduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghIntroduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghAnkitkumar Singh
 
Cascading style sheet an introduction
Cascading style sheet   an introductionCascading style sheet   an introduction
Cascading style sheet an introductionHimanshu Pathak
 
New css features
New css featuresNew css features
New css featuresabdul kalam
 
46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello worldhemi46h
 

What's hot (20)

uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Web programming css
Web programming cssWeb programming css
Web programming css
 
Css1
Css1Css1
Css1
 
CSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorCSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and Color
 
Css
CssCss
Css
 
Web Development
Web DevelopmentWeb Development
Web Development
 
Web topic 14 cascading style sheets
Web topic 14  cascading style sheetsWeb topic 14  cascading style sheets
Web topic 14 cascading style sheets
 
Castro Chapter 8
Castro Chapter 8Castro Chapter 8
Castro Chapter 8
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
 
Need for css,introduction to css & basic syntax wt
Need for css,introduction to css &  basic syntax wtNeed for css,introduction to css &  basic syntax wt
Need for css,introduction to css & basic syntax wt
 
Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)
 
Welcome to css!
Welcome to css!Welcome to css!
Welcome to css!
 
Introduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghIntroduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar Singh
 
Cascading style sheet an introduction
Cascading style sheet   an introductionCascading style sheet   an introduction
Cascading style sheet an introduction
 
.Less - CSS done right
.Less - CSS done right.Less - CSS done right
.Less - CSS done right
 
Html intro
Html introHtml intro
Html intro
 
Html css
Html cssHtml css
Html css
 
New css features
New css featuresNew css features
New css features
 
03html Css
03html Css03html Css
03html Css
 
46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world
 

Viewers also liked (7)

Statistics
StatisticsStatistics
Statistics
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
Industrial training project management session2
Industrial training project management session2Industrial training project management session2
Industrial training project management session2
 
How to setup android development environment baabtra Android Workshop Kit?
How to setup android development environment baabtra Android Workshop Kit?How to setup android development environment baabtra Android Workshop Kit?
How to setup android development environment baabtra Android Workshop Kit?
 
Pdf creation using python
Pdf creation using pythonPdf creation using python
Pdf creation using python
 
DOM Structure
DOM StructureDOM Structure
DOM Structure
 
Leadership Qualities
Leadership QualitiesLeadership Qualities
Leadership Qualities
 

Similar to Baabtra CSS Presentation

Intro to WebSite Development ( Text properties and margins )
Intro to WebSite Development ( Text properties and margins )Intro to WebSite Development ( Text properties and margins )
Intro to WebSite Development ( Text properties and margins )Abdul Basit Kayani
 
Css tutorial
Css tutorialCss tutorial
Css tutorialvedaste
 
6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.pptVARNITBHASKAR1
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmithaps4
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
Html Css
Html CssHtml Css
Html Csspumas26
 
05. session 05 introducing css
05. session 05   introducing css05. session 05   introducing css
05. session 05 introducing cssPhúc Đỗ
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
 
Fwd week2 tw-20120903
Fwd week2 tw-20120903Fwd week2 tw-20120903
Fwd week2 tw-20120903TerryWeber
 
Html and css easy steps
Html and css easy stepsHtml and css easy steps
Html and css easy stepsBiswa Ranjan
 
Css presentation introdution with sample basic projects
Css presentation introdution with sample basic projectsCss presentation introdution with sample basic projects
Css presentation introdution with sample basic projectsDigital Shende
 

Similar to Baabtra CSS Presentation (20)

TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0
 
Intro to WebSite Development ( Text properties and margins )
Intro to WebSite Development ( Text properties and margins )Intro to WebSite Development ( Text properties and margins )
Intro to WebSite Development ( Text properties and margins )
 
Turorial css
Turorial cssTurorial css
Turorial css
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Css Basics
Css BasicsCss Basics
Css Basics
 
Css starting
Css startingCss starting
Css starting
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
 
6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
cse labpractical.ppt
cse labpractical.pptcse labpractical.ppt
cse labpractical.ppt
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
Html Css
Html CssHtml Css
Html Css
 
05. session 05 introducing css
05. session 05   introducing css05. session 05   introducing css
05. session 05 introducing css
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Fwd week2 tw-20120903
Fwd week2 tw-20120903Fwd week2 tw-20120903
Fwd week2 tw-20120903
 
Html and css easy steps
Html and css easy stepsHtml and css easy steps
Html and css easy steps
 
Css presentation introdution with sample basic projects
Css presentation introdution with sample basic projectsCss presentation introdution with sample basic projects
Css presentation introdution with sample basic projects
 

More from baabtra.com - No. 1 supplier of quality freshers

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Baabtra CSS Presentation

  • 1.
  • 2. Disclaimer:This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 3. Cascading Style Sheets (CSS) Ashwin Anand V Email:ashwinanand99@gmail.com Facebook id:ashwinanand99@gmail.com
  • 4. The Breakdown • All web pages can be broken down into bucketized content areas • These areas can updated by changing the code on every page, - or - • By using cascading style sheets!
  • 5. Cascading Style Sheets • Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation (that is, the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document • Created by: CSS was created by Håkon Wium Lie and Bert Bos and was adopted as a W3C Recommendation in late 1996.
  • 6. What Are Cascading Style Sheets? • A standards-based method for controlling the look and feel of XML content. • Comprised of Rules to control elements in the document. • Designed to separate formatting from the content while being flexible and scalable
  • 7. What Can CSS Do? • Text formatting • Element sizing • Element positioning • Change link attributes • Cursor manipulation
  • 8. • Most importantly, CSS can support the control of hundreds or thousands of documents from a single control file • This makes your life much easier when it is time to make updates
  • 10. • Three CSS implementations – Inline • Affects only the element applied to – Embedded • Affects only the elements in a single file – External • Linked to an unlimited number of files
  • 11. HTML Page Structure Document (HTML) <HTML> Head <HEAD> Title Text <TITLE>Title Text</TITLE> </HEAD> Body <BODY> H1 Heading <H1>H1 Heading</H1> Paragraph 1 <P>Paragraph 1</P> <P>Paragraph 2</P> Paragraph 2 </BODY> </HTML>
  • 12. Inline CSS Use the STYLE attribute <p>This is normal text</p> <p><b>This is bold text</b></p> <p style=“font-weight: bold”>This is bold text</p>
  • 13. Embedded CSS • Added to the <HEAD> area of file • Use <STYLE> element <HEAD> <TITLE>New Topic1</TITLE> <STYLE>P{font-weight:bold}</STYLE> </HEAD>
  • 14. External CSS • The <LINK> element is used to attach a CSS document to an HTML document <HEAD> <TITLE>New Topic1</TITLE> <LINK HREF="example.css" REL="StyleSheet" > </HEAD>
  • 16. The three CSS types combine at run time to render the page. Order of precedence • Inline styles • Embedded style sheets • Linked (external) style sheets
  • 17. Style Rules Inline style=“font-weight: bold” Property Value Embedded/ H1 {font-weight: bold} External Selector Declaration H1 {font-weight: bold; color:black; }
  • 18. Creating a Cascading Style Sheet body {color: #000000; <html > background: #F1F2EC; <head> font-size: 8pt; <link href="test.css" rel="stylesheet" /> </head> font-family: Verdana, <body> Arial,Helvetica, Sans Serif;} <h1>Heading 1 Text</h1> h1 {color: #0D10E5; <p>A normal paragraph</p> <h2>Heading 2 Text</h2> font-size: 12pt;} <p>Another normal paragraph</p> h2 {color: #040677; <p>This paragraph will be a tip.</p> </body> font-size: 10pt;} </html> p {margin-bottom: 16px;}
  • 19. CLASS attribute • Class Syntax: – In a style sheet: P.myclass { color:blue;} – In a page: <P CLASS=“myclass”>Text</P>
  • 20. Creating a Cascading Style Sheet body {color: #000000; background: #F1F2EC; font-size: 8pt; <html > font-family: Verdana, Arial, Helvetica, Sans Serif;} <head> h1 {color: #002000; <link href="test.css" rel="stylesheet" /> font-size: 12pt;} </head> h2 {color: #002b00; <body> font-size: 10pt;} <h1>Heading 1 Text</h1> <p>A normal paragraph</p> p {margin-bottom: 16px;} <h2>Heading 2 Text</h2> p.tip {color: #BEF5BF; <p>Another normal paragraph</p> font-weight: bold; <p class=“tip”>This paragraph will be a tip.</p> background-color: #696969; padding-left: 0.8em; </body> padding-right: 0.8em; </html> padding-bottom: 0.3em; padding-top: 0.3em; border-bottom-color: #000000; border-bottom-style: Solid; border-bottom-width: 1px; border-top-color: #000000; border-top-style: Solid; border-top-width: 1px;}
  • 21. • If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. • www.baabtra.com | www.massbaab.com |ww w.baabte.com