SlideShare a Scribd company logo
Css with example
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
RESHMYCS
reshmycs@gmail.com
www.facebook.com/username
twitter.com/username
in.linkedin.com/in/profilename
CSS
CSS
• CSS stands for Cascading Style Sheets.
• CSS is used to control the style of a web
document in a simple and easy way
• Simple & Reusable
• Separate content from presentation
• separate content from presentation
Advantages of CSS
• CSS saves time
• Easy maintenance
• Superior styles to HTML
• Pages load faster
• Multiple Device Compatibility
• Global web standards
Disadvantages of css
• Browser support for style sheets is
inconsistent
Who Creates and Maintains CSS?
• CSS is created and maintained through a
group of people within the W3C called the CSS
Working Group
• Specifications-Document
SYNTAX
• A CSS comprises of style rules that are
interpreted by the browser and then applied
to the corresponding elements in your
document. A style rule is made of three parts:
• Selector:
Eg:<h1> or <table> etc.
• Property: A property is a type of attribute of
HTML tag.. They could be color, border, etc.
• Value: Values are assigned to properties. For
example, color :#F1F1F1 etc.
Different Ways To Format CSS
• By using id
<!DOCTYPE html>
<head>
<style>
#firstname { background-color: yellow;}
</style>
</head>
<body><h1>Welcome to My Homepage</h1>
<div id=" firstname ">
<p>You have a nice day</p>
</div>
</body>
</html>
• Bu using class
<!DOCTYPE html>
<head>
<style>
.bg { background-color: yellow;}
</style>
</head>
<body><h1>Welcome to My Homepage</h1>
<div class=“bg ">
<p>You have a nice day</p>
</div>
</body>
</html>
• By using tags
<!DOCTYPE html>
<head>
<style>
body {
color: red;
}
</style>
</head>
<body><h1>Welcome to My Homepage</h1>
<p>You have a nice day</p>
</body>
</html>
INCLUSION
• Four ways to associate styles with your HTML
document
• Commonly used methods are inline CSS and
External CSS
Embedded CSS -The <style>
Element
• <head>
<style type="text/css" media="all">
h1
{
color: #36C;
}
</style>
</head>
Inline CSS
• By using style attribute. These rules will be
applied to that element only
• For Example,
h1 style ="color:#36C;"> This is inline CSS
</h1>
External CSS -The <link> Element
• <link> element can be used to include an
external stylesheet file in your HTML
document.
• Example:<head>
<link type="text/css" href="mystyle.css"
media="all" />
</head>
Imported CSS -@import Rule
• @import is used to import an external style
sheet in a manner similar to the <link>
element.
• <head> @import "mystyle.css"; </head>
MEASUREMENT UNITS
• % -Percentage
• cm –centimeters
• em - relative measurement for the height of a
font in em spaces.
• in -inches
• mm-millimeter
• px-screen pixels
Style Properties
Color Properties
 Background Properties
 Font Properties
 Text Properties
 Border Properties
 Table Properties
 Marquee Properties
Example
<!DOCTYPE html>
<html>
<head>
<style>
body { color: red; }
h1 { color: #00ff00; }
p.ex { color: rgb(0,0,255); }
</style>
</head>
<body><h1>This is heading 1</h1>
<p>This is an ordinary paragraph. Notice that this text is red. The default text-
color for a page is defined in the body selector.</p>
<p class="ex">This is a paragraph with class="ex". This text is blue.</p>
</body></html>
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

PPTX
HTML- Hyper Text Markup Language
PPTX
CSS- Cascading Style Sheet
PPT
Basic HTML/CSS
PPTX
Css how to insert css
PDF
Html:css crash course (4:5)
PPTX
The SEO Workshop (session 2)
PPTX
HTML Coding #01 : Don't Fear the Code
PDF
Html css crash course may 11th, atlanta
HTML- Hyper Text Markup Language
CSS- Cascading Style Sheet
Basic HTML/CSS
Css how to insert css
Html:css crash course (4:5)
The SEO Workshop (session 2)
HTML Coding #01 : Don't Fear the Code
Html css crash course may 11th, atlanta

What's hot (20)

PDF
Thinkful - Frontend Crash Course - Intro to HTML/CSS
PPTX
The Afterburner - Optimizing Drupal for Speed and SEO
KEY
Xpert Summit 2011: Avoiding HTM-Hell
PPTX
Html lesson1 5
PDF
The web context
PPTX
Create Fashion Blog using HTML
PPTX
Web 101 intro to html
PDF
Css few small tips and information
PDF
Webの仕組み part2
PPTX
Web Development
PPTX
WordPress Themes - From Designer’s Perspective
PPTX
Web Design Course - Lecture 2 - HTML Tag, Element, Attributes
PPT
Pres
PPTX
Web Design Norms
PPTX
Css(cascading style sheets)
PDF
Css presentation introdution with sample basic projects
PPT
Themer's roundtable
Thinkful - Frontend Crash Course - Intro to HTML/CSS
The Afterburner - Optimizing Drupal for Speed and SEO
Xpert Summit 2011: Avoiding HTM-Hell
Html lesson1 5
The web context
Create Fashion Blog using HTML
Web 101 intro to html
Css few small tips and information
Webの仕組み part2
Web Development
WordPress Themes - From Designer’s Perspective
Web Design Course - Lecture 2 - HTML Tag, Element, Attributes
Pres
Web Design Norms
Css(cascading style sheets)
Css presentation introdution with sample basic projects
Themer's roundtable
Ad

Similar to Css with example (20)

PPTX
PDF
CSS notes
PDF
Css tutorial
PPT
CSS Training in Bangalore
PPTX
PPTX
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
PPTX
CSS Basics part One
PPTX
CSS tutorial chapter 1
PPTX
PPTX
Kick start @ css
PPTX
CSS1.pptx
DOC
Css introduction
PPTX
PPTX
uptu web technology unit 2 Css
PDF
Unit 3 (it workshop).pptx
PPTX
CSS_Day_ONE (W3schools)
PPTX
Cordova training - Day 2 Introduction to CSS 3
CSS notes
Css tutorial
CSS Training in Bangalore
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
CSS Basics part One
CSS tutorial chapter 1
Kick start @ css
CSS1.pptx
Css introduction
uptu web technology unit 2 Css
Unit 3 (it workshop).pptx
CSS_Day_ONE (W3schools)
Cordova training - Day 2 Introduction to CSS 3
Ad

More from reshmy12 (6)

PPT
class diagrams and their relationships
PPTX
Js tutorial(Basic concepts, running a program ,console,variable,types etc..)
PPTX
SUBMERGED FLOATING TUNNEL,COMPETITIVE FEATURES OF SFT CASE STUDY ON A SFT : T...
PPTX
Functions in c
PPTX
Encryption.ppt
PPTX
INTRUDUCTION TO HTML 5
class diagrams and their relationships
Js tutorial(Basic concepts, running a program ,console,variable,types etc..)
SUBMERGED FLOATING TUNNEL,COMPETITIVE FEATURES OF SFT CASE STUDY ON A SFT : T...
Functions in c
Encryption.ppt
INTRUDUCTION TO HTML 5

Recently uploaded (20)

PDF
Types of Literary Text: Poetry and Prose
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
How to Manage Global Discount in Odoo 18 POS
PPTX
How to Manage Loyalty Points in Odoo 18 Sales
PDF
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
PDF
LDMMIA Reiki Yoga Workshop 15 MidTerm Review
PPTX
Introduction and Scope of Bichemistry.pptx
PDF
Cell Biology Basics: Cell Theory, Structure, Types, and Organelles | BS Level...
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
PDF
Sunset Boulevard Student Revision Booklet
PDF
What Is Coercive Control? Understanding and Recognizing Hidden Abuse
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
PPTX
Odoo 18 Sales_ Managing Quotation Validity
Types of Literary Text: Poetry and Prose
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Week 4 Term 3 Study Techniques revisited.pptx
How to Manage Global Discount in Odoo 18 POS
How to Manage Loyalty Points in Odoo 18 Sales
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
LDMMIA Reiki Yoga Workshop 15 MidTerm Review
Introduction and Scope of Bichemistry.pptx
Cell Biology Basics: Cell Theory, Structure, Types, and Organelles | BS Level...
Open Quiz Monsoon Mind Game Final Set.pptx
NOI Hackathon - Summer Edition - GreenThumber.pptx
Cardiovascular Pharmacology for pharmacy students.pptx
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
Sunset Boulevard Student Revision Booklet
What Is Coercive Control? Understanding and Recognizing Hidden Abuse
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Odoo 18 Sales_ Managing Quotation Validity

Css with example

  • 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. CSS • CSS stands for Cascading Style Sheets. • CSS is used to control the style of a web document in a simple and easy way • Simple & Reusable • Separate content from presentation • separate content from presentation
  • 5. Advantages of CSS • CSS saves time • Easy maintenance • Superior styles to HTML • Pages load faster • Multiple Device Compatibility • Global web standards Disadvantages of css • Browser support for style sheets is inconsistent
  • 6. Who Creates and Maintains CSS? • CSS is created and maintained through a group of people within the W3C called the CSS Working Group • Specifications-Document
  • 7. SYNTAX • A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts: • Selector: Eg:<h1> or <table> etc. • Property: A property is a type of attribute of HTML tag.. They could be color, border, etc.
  • 8. • Value: Values are assigned to properties. For example, color :#F1F1F1 etc.
  • 9. Different Ways To Format CSS • By using id <!DOCTYPE html> <head> <style> #firstname { background-color: yellow;} </style> </head> <body><h1>Welcome to My Homepage</h1> <div id=" firstname "> <p>You have a nice day</p> </div> </body> </html>
  • 10. • Bu using class <!DOCTYPE html> <head> <style> .bg { background-color: yellow;} </style> </head> <body><h1>Welcome to My Homepage</h1> <div class=“bg "> <p>You have a nice day</p> </div> </body> </html>
  • 11. • By using tags <!DOCTYPE html> <head> <style> body { color: red; } </style> </head> <body><h1>Welcome to My Homepage</h1> <p>You have a nice day</p> </body> </html>
  • 12. INCLUSION • Four ways to associate styles with your HTML document • Commonly used methods are inline CSS and External CSS
  • 13. Embedded CSS -The <style> Element • <head> <style type="text/css" media="all"> h1 { color: #36C; } </style> </head>
  • 14. Inline CSS • By using style attribute. These rules will be applied to that element only • For Example, h1 style ="color:#36C;"> This is inline CSS </h1>
  • 15. External CSS -The <link> Element • <link> element can be used to include an external stylesheet file in your HTML document. • Example:<head> <link type="text/css" href="mystyle.css" media="all" /> </head>
  • 16. Imported CSS -@import Rule • @import is used to import an external style sheet in a manner similar to the <link> element. • <head> @import "mystyle.css"; </head>
  • 17. MEASUREMENT UNITS • % -Percentage • cm –centimeters • em - relative measurement for the height of a font in em spaces. • in -inches • mm-millimeter • px-screen pixels
  • 18. Style Properties Color Properties  Background Properties  Font Properties  Text Properties  Border Properties  Table Properties  Marquee Properties
  • 19. Example <!DOCTYPE html> <html> <head> <style> body { color: red; } h1 { color: #00ff00; } p.ex { color: rgb(0,0,255); } </style> </head> <body><h1>This is heading 1</h1> <p>This is an ordinary paragraph. Notice that this text is red. The default text- color for a page is defined in the body selector.</p> <p class="ex">This is a paragraph with class="ex". This text is blue.</p> </body></html>
  • 21. 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.
  • 22. 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
  • 23. 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: [email protected] Contact Us