SlideShare a Scribd company logo
1 of 29
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
Nasla.C.K
naslack31@gmail.com
in.linkedin.com/in/nasla
12345656
CSS
CONTENTS
• What is CSS?
• Style Sheet
• Advantages of CSS
• Selectors
• Style Properties
• Example
CSS
• CSS stands for Cascading Style Sheet.
• HTML and CSS work together to produce
beautiful and functional Web sites
• HTML = structure & CSS = style
• “HTML without CSS is like a piece of candy
without a pretty wrapper.”
CSS
• CSS works on the box model. A typical Web
page consists of many boxes joined together
from top to bottom. These boxes can be
stacked, nested, and can float.
• CSS can control many elements of our web
pages: colors, fonts, alignment, borders,
backgrounds, spacing, margins, and much
more.
CSS
• An HTML file (or multiple files) links to a CSS
file (or multiple CSS files) and when the web
browser displays the page, it references the
CSS file(s) to determine how to display the
content.
• Allows elements to “inherit” styles from
parent elements.
Attaching a Style Sheet
• Attach a style sheet to a page by adding the
code to the <head> section of the HTML page.
There are 3 ways to attach CSS to a page:
1. External Style Sheet: Best used to control
styling on multiple pages.
<link rel="stylesheet"
type="text/css"
href="css/styles.css" />
Attaching a Style Sheet
2. Internal Style Sheet: Best used to control
styling on one page.
<style type=“text/css”>
h1 {color: red)
</style>
3. Inline Style Sheet: CSS is not attached in the
<header> but is used directly within HTML tags.
<p style=“color: red”>Some
Text</p>
Attaching a Style Sheet
• It will use a priority system to determine
which format to display on the page.
– Inline style (highest priority)
– Internal style sheet (second priority)
– External style sheet (third priority)
Advantages of CSS
• CSS saves time
• Pages load faster
Less code means faster download times.
• Easy maintenance
To change the style of an element, you only have to
make an edit in one place.
• Superior styles to HTML
CSS has a much wider array of attributes than HTML.
• Consistency : A Standard flow, look & feel can be
maintained for all pages of a Web Site.
Selectors
• A selector identifies elements on an HTML
page .
• A CSS Rule is made up of a selector and a
declaration.
• A declaration consists of property and value.
• selector {property: value;}
declaration
Selectors
• The declaration groups are surrounded by
curly brackets:, { }.
• A semicolon must follow each style
declaration.
• You can define as many selectors as you wish
for the element you are formatting.
Selectors
• Types,
– Element Selector
– Class selectors
– Contextual selectors
• Element Selector
A selector, here in green, is often an element of
HTML.
– body {background: purple; }
– h1 {color: green; }
Selectors
• ID and Class selectors:
• IDs (#) are unique and can only be used once
on the page.
• Classes (.) can be used as many times as
needed. i.e. reusable.
Selectors
• HTML Code:
<h1 id=“mainHeading”>Names</h1>
<p class=“name”>Joe</p>
• CSS Code:
#mainHeading {color: green}
.name {color: red}
Selectors
• Contextual selectors
For selecting tags according to condition.
Eg: If we need to select paragraph tags inside table
tag
– table p { color: blue }
This one is saying that you want to set the value for <p>
tags that belongs to <table> tags.
Style Properties
• Background
• Font
• Text
• Border
• Table
Style Properties
• Background properties.
– background-color
– background-image
– background-repeat
– background-attachment
– background-position
– background
Style Properties
• Text properties.
– Text-indent
– Text-align
– Text-decoration
– Letter-spacing
– Text-transform
– Word-spacing
Style Properties
• Font properties.
– Font
– Font-family
– Font-size
– Font-style
– @font-face
– Font-kerning
Style Properties
• Border Properties
– border
– Border-style
– Border-width
– Border-color
– Border-radius
Style Properties
• Table properties
– border-collapse
– Border-spacing
– Padding
– Height
– Width
– Caption-side
Example
Example
Thankyou…
Want to learn more about programming or Looking to become a good programmer?
Are you wasting time on searching so many contents online?
Do you want to learn things quickly?
Tired of spending huge amount of money to become a Software professional?
Do an online course
@ baabtra.com
We put industry standards to practice. Our structured, activity based courses are so designed
to make a quick, good software professional out of anybody who holds a passion for coding.
Follow us @ twitter.com/baabtra
Like us @ facebook.com/baabtra
Subscribe to us @ youtube.com/baabtra
Become a follower @ slideshare.net/BaabtraMentoringPartner
Connect to us @ in.linkedin.com/in/baabtra
Give a feedback @ massbaab.com/baabtra
Thanks in advance
www.baabtra.com | www.massbaab.com |www.baabte.com
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Cafit Square,
Hilite Business Park,
Near Pantheerankavu,
Kozhikode
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com
Contact Us

More Related Content

What's hot

What's hot (17)

Css
CssCss
Css
 
CSS introduction
CSS introductionCSS introduction
CSS introduction
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
CSS tutorial chapter 3
CSS tutorial chapter 3CSS tutorial chapter 3
CSS tutorial chapter 3
 
CSS tutorial chapter 2
CSS tutorial chapter 2CSS tutorial chapter 2
CSS tutorial chapter 2
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Cascading style sheet (css)]
Cascading style sheet (css)]Cascading style sheet (css)]
Cascading style sheet (css)]
 
Introduction to css & its attributes with syntax
Introduction to css & its attributes with syntaxIntroduction to css & its attributes with syntax
Introduction to css & its attributes with syntax
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Basic css
Basic cssBasic css
Basic css
 
Css intro
Css introCss intro
Css intro
 
Css
CssCss
Css
 
Intro to css & sass
Intro to css & sassIntro to css & sass
Intro to css & sass
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)
 

Viewers also liked

11 Animalien ugalketa
11 Animalien ugalketa11 Animalien ugalketa
11 Animalien ugalketaBioGeoUgle
 
10 Animalien harreman-funtzioa
10 Animalien harreman-funtzioa10 Animalien harreman-funtzioa
10 Animalien harreman-funtzioaBioGeoUgle
 
ODS Summer Edition 2015 progetto CitiesZen - Palermo 2015.09.04
ODS Summer Edition 2015  progetto CitiesZen - Palermo 2015.09.04ODS Summer Edition 2015  progetto CitiesZen - Palermo 2015.09.04
ODS Summer Edition 2015 progetto CitiesZen - Palermo 2015.09.04Paolo Manuella
 
Magento Corporate Resume 2015
Magento Corporate Resume 2015Magento Corporate Resume 2015
Magento Corporate Resume 2015pranjali rai
 
8 - 9 Animalien nutrizioa
8 - 9 Animalien nutrizioa8 - 9 Animalien nutrizioa
8 - 9 Animalien nutrizioaBioGeoUgle
 
4 izaki bizidunen funtzioak
4 izaki bizidunen funtzioak4 izaki bizidunen funtzioak
4 izaki bizidunen funtzioakBioGeoUgle
 
Drupal Corporate Resume 2015
Drupal Corporate Resume 2015Drupal Corporate Resume 2015
Drupal Corporate Resume 2015pranjali rai
 
14 Metamorfismoaren prozesuak
14 Metamorfismoaren prozesuak14 Metamorfismoaren prozesuak
14 Metamorfismoaren prozesuakBioGeoUgle
 

Viewers also liked (13)

11 Animalien ugalketa
11 Animalien ugalketa11 Animalien ugalketa
11 Animalien ugalketa
 
10 Animalien harreman-funtzioa
10 Animalien harreman-funtzioa10 Animalien harreman-funtzioa
10 Animalien harreman-funtzioa
 
ODS Summer Edition 2015 progetto CitiesZen - Palermo 2015.09.04
ODS Summer Edition 2015  progetto CitiesZen - Palermo 2015.09.04ODS Summer Edition 2015  progetto CitiesZen - Palermo 2015.09.04
ODS Summer Edition 2015 progetto CitiesZen - Palermo 2015.09.04
 
Magento Corporate Resume 2015
Magento Corporate Resume 2015Magento Corporate Resume 2015
Magento Corporate Resume 2015
 
իմ ամառը
իմ ամառըիմ ամառը
իմ ամառը
 
8 - 9 Animalien nutrizioa
8 - 9 Animalien nutrizioa8 - 9 Animalien nutrizioa
8 - 9 Animalien nutrizioa
 
իմ ամառը
իմ ամառըիմ ամառը
իմ ամառը
 
իմ ամառը
իմ ամառըիմ ամառը
իմ ամառը
 
Tugas teori ekonomi mikro
Tugas teori ekonomi mikroTugas teori ekonomi mikro
Tugas teori ekonomi mikro
 
Html5
Html5Html5
Html5
 
4 izaki bizidunen funtzioak
4 izaki bizidunen funtzioak4 izaki bizidunen funtzioak
4 izaki bizidunen funtzioak
 
Drupal Corporate Resume 2015
Drupal Corporate Resume 2015Drupal Corporate Resume 2015
Drupal Corporate Resume 2015
 
14 Metamorfismoaren prozesuak
14 Metamorfismoaren prozesuak14 Metamorfismoaren prozesuak
14 Metamorfismoaren prozesuak
 

Similar to Css

Similar to Css (20)

2 introduction css
2 introduction css2 introduction css
2 introduction css
 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
DHTML
DHTMLDHTML
DHTML
 
Unit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptxUnit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptx
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptx
 
Css
CssCss
Css
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxCascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
 
Week11 Lecture: CSS
Week11 Lecture: CSSWeek11 Lecture: CSS
Week11 Lecture: CSS
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Web Development - Lecture 5
Web Development - Lecture 5Web Development - Lecture 5
Web Development - Lecture 5
 
CSS Overview
CSS OverviewCSS Overview
CSS Overview
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
 
Chapter 11: Intro to CSS
Chapter 11: Intro to CSSChapter 11: Intro to CSS
Chapter 11: Intro to CSS
 

Recently uploaded

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

Css

  • 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
  • 4. CONTENTS • What is CSS? • Style Sheet • Advantages of CSS • Selectors • Style Properties • Example
  • 5. CSS • CSS stands for Cascading Style Sheet. • HTML and CSS work together to produce beautiful and functional Web sites • HTML = structure & CSS = style • “HTML without CSS is like a piece of candy without a pretty wrapper.”
  • 6. CSS • CSS works on the box model. A typical Web page consists of many boxes joined together from top to bottom. These boxes can be stacked, nested, and can float. • CSS can control many elements of our web pages: colors, fonts, alignment, borders, backgrounds, spacing, margins, and much more.
  • 7. CSS • An HTML file (or multiple files) links to a CSS file (or multiple CSS files) and when the web browser displays the page, it references the CSS file(s) to determine how to display the content. • Allows elements to “inherit” styles from parent elements.
  • 8. Attaching a Style Sheet • Attach a style sheet to a page by adding the code to the <head> section of the HTML page. There are 3 ways to attach CSS to a page: 1. External Style Sheet: Best used to control styling on multiple pages. <link rel="stylesheet" type="text/css" href="css/styles.css" />
  • 9. Attaching a Style Sheet 2. Internal Style Sheet: Best used to control styling on one page. <style type=“text/css”> h1 {color: red) </style> 3. Inline Style Sheet: CSS is not attached in the <header> but is used directly within HTML tags. <p style=“color: red”>Some Text</p>
  • 10. Attaching a Style Sheet • It will use a priority system to determine which format to display on the page. – Inline style (highest priority) – Internal style sheet (second priority) – External style sheet (third priority)
  • 11. Advantages of CSS • CSS saves time • Pages load faster Less code means faster download times. • Easy maintenance To change the style of an element, you only have to make an edit in one place. • Superior styles to HTML CSS has a much wider array of attributes than HTML. • Consistency : A Standard flow, look & feel can be maintained for all pages of a Web Site.
  • 12. Selectors • A selector identifies elements on an HTML page . • A CSS Rule is made up of a selector and a declaration. • A declaration consists of property and value. • selector {property: value;} declaration
  • 13. Selectors • The declaration groups are surrounded by curly brackets:, { }. • A semicolon must follow each style declaration. • You can define as many selectors as you wish for the element you are formatting.
  • 14. Selectors • Types, – Element Selector – Class selectors – Contextual selectors • Element Selector A selector, here in green, is often an element of HTML. – body {background: purple; } – h1 {color: green; }
  • 15. Selectors • ID and Class selectors: • IDs (#) are unique and can only be used once on the page. • Classes (.) can be used as many times as needed. i.e. reusable.
  • 16. Selectors • HTML Code: <h1 id=“mainHeading”>Names</h1> <p class=“name”>Joe</p> • CSS Code: #mainHeading {color: green} .name {color: red}
  • 17. Selectors • Contextual selectors For selecting tags according to condition. Eg: If we need to select paragraph tags inside table tag – table p { color: blue } This one is saying that you want to set the value for <p> tags that belongs to <table> tags.
  • 18. Style Properties • Background • Font • Text • Border • Table
  • 19. Style Properties • Background properties. – background-color – background-image – background-repeat – background-attachment – background-position – background
  • 20. Style Properties • Text properties. – Text-indent – Text-align – Text-decoration – Letter-spacing – Text-transform – Word-spacing
  • 21. Style Properties • Font properties. – Font – Font-family – Font-size – Font-style – @font-face – Font-kerning
  • 22. Style Properties • Border Properties – border – Border-style – Border-width – Border-color – Border-radius
  • 23. Style Properties • Table properties – border-collapse – Border-spacing – Padding – Height – Width – Caption-side
  • 27. Want to learn more about programming or Looking to become a good programmer? Are you wasting time on searching so many contents online? Do you want to learn things quickly? Tired of spending huge amount of money to become a Software professional? Do an online course @ baabtra.com We put industry standards to practice. Our structured, activity based courses are so designed to make a quick, good software professional out of anybody who holds a passion for coding.
  • 28. Follow us @ twitter.com/baabtra Like us @ facebook.com/baabtra Subscribe to us @ youtube.com/baabtra Become a follower @ slideshare.net/BaabtraMentoringPartner Connect to us @ in.linkedin.com/in/baabtra Give a feedback @ massbaab.com/baabtra Thanks in advance www.baabtra.com | www.massbaab.com |www.baabte.com
  • 29. Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Cafit Square, Hilite Business Park, Near Pantheerankavu, Kozhikode Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com Contact Us