SlideShare uma empresa Scribd logo
1 de 9
CSS Introduction What is CSS? ,[object Object]
Styles define how to display HTML elements
Styles were added to HTML 4.0 to solve a  problem
External Style Sheets can save a lot of work
External Style Sheets are stored in CSS files
CSS Syntax: ,[object Object],Each declaration consists of a property and a value. The property is the style attribute you want to change. Each property has a value. CSS Example p { color:red; text-align:center; }
CSS Id and Class: The id Selector: The id selector is used to specify a style for a single, unique element. The id selector uses the id attribute of the HTML element, and is defined with a "#". The style rule below will be applied to the element with id="para1": #para1 { text-align:center; color:red; }  The class Selector: The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements.  This allows you to set a particular style for any HTML elements with the same class.  The class selector uses the HTML class attribute, and is defined with a "." In the example below, all HTML elements with class="center" will be center-aligned: .center {text-align:center;}  You can also specify that only specific HTML elements should be affected by a class. p.center {text-align:center;}
CSS Background: Background Color: body {background-color:#b0c4de;}  In the example below, the h1, p, and div elements have different background colors: The background color of a page is defined in the body selector: h1 {background-color:#6495ed;} p {background-color:#e0ffff;} div {background-color:#b0c4de;} Background Image: The background image for a page can be set like this: body {background-image:url('paper.gif');}  body { background-image:url('gradient2.png'); background-repeat:repeat-x; }  If the image is repeated only horizontally (repeat-x), the background will look better:
CSS Text: Text Color: The default color for a page is defined in the body selector. body {color:blue;} h1 {color:#00ff00;} h2 {color:rgb(255,0,0);} Text Alignment: h1 {text-align:center;} p.date {text-align:right;} p.main {text-align:justify;}  h1 {text-decoration:overline;} h2 {text-decoration:line-through;} h3 {text-decoration:underline;} h4 {text-decoration:blink;} Text Decoration:

Mais conteúdo relacionado

Mais procurados (20)

Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
 
What is CSS?
What is CSS?What is CSS?
What is CSS?
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
css.ppt
css.pptcss.ppt
css.ppt
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
 
Css
CssCss
Css
 
Css notes
Css notesCss notes
Css notes
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
Css
CssCss
Css
 
CSS
CSSCSS
CSS
 
Css
CssCss
Css
 
Web Development 3 (HTML & CSS)
Web Development 3  (HTML & CSS)Web Development 3  (HTML & CSS)
Web Development 3 (HTML & CSS)
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
 
Html, CSS & Web Designing
Html, CSS & Web DesigningHtml, CSS & Web Designing
Html, CSS & Web Designing
 
Html training slide
Html training slideHtml training slide
Html training slide
 
Introduction to Cascading Style Sheets
Introduction to Cascading Style SheetsIntroduction to Cascading Style Sheets
Introduction to Cascading Style Sheets
 
CSS Refresher
CSS RefresherCSS Refresher
CSS Refresher
 

Destaque

Trends Brazil mobile market
Trends Brazil mobile market Trends Brazil mobile market
Trends Brazil mobile market Adriano Alves
 
Reception Parents 2010
Reception Parents 2010Reception Parents 2010
Reception Parents 2010jutaharris
 
Hear Always Cochlear Newsletter - June 2010
Hear Always Cochlear Newsletter - June 2010Hear Always Cochlear Newsletter - June 2010
Hear Always Cochlear Newsletter - June 2010kjbt_100
 
Hear It Report October 2006
Hear It Report October 2006Hear It Report October 2006
Hear It Report October 2006kjbt_100
 
Untreated Hearing Loss Impact On Income
Untreated Hearing Loss   Impact On IncomeUntreated Hearing Loss   Impact On Income
Untreated Hearing Loss Impact On Incomekjbt_100
 
ISANG DOSENANG KLASE NG HIGH SCHOOL STUDENTS
ISANG DOSENANG KLASE NG HIGH SCHOOL STUDENTSISANG DOSENANG KLASE NG HIGH SCHOOL STUDENTS
ISANG DOSENANG KLASE NG HIGH SCHOOL STUDENTSRamelia Ulpindo
 
Pang arawaraw na tala 10
Pang arawaraw na tala 10Pang arawaraw na tala 10
Pang arawaraw na tala 10Ramelia Ulpindo
 

Destaque (10)

5-Reasons-whitepaper
5-Reasons-whitepaper5-Reasons-whitepaper
5-Reasons-whitepaper
 
Trends Brazil mobile market
Trends Brazil mobile market Trends Brazil mobile market
Trends Brazil mobile market
 
Reception Parents 2010
Reception Parents 2010Reception Parents 2010
Reception Parents 2010
 
Hear Always Cochlear Newsletter - June 2010
Hear Always Cochlear Newsletter - June 2010Hear Always Cochlear Newsletter - June 2010
Hear Always Cochlear Newsletter - June 2010
 
Hear It Report October 2006
Hear It Report October 2006Hear It Report October 2006
Hear It Report October 2006
 
Untreated Hearing Loss Impact On Income
Untreated Hearing Loss   Impact On IncomeUntreated Hearing Loss   Impact On Income
Untreated Hearing Loss Impact On Income
 
Html
HtmlHtml
Html
 
ISANG DOSENANG KLASE NG HIGH SCHOOL STUDENTS
ISANG DOSENANG KLASE NG HIGH SCHOOL STUDENTSISANG DOSENANG KLASE NG HIGH SCHOOL STUDENTS
ISANG DOSENANG KLASE NG HIGH SCHOOL STUDENTS
 
Kung bakit umuulan
Kung bakit umuulanKung bakit umuulan
Kung bakit umuulan
 
Pang arawaraw na tala 10
Pang arawaraw na tala 10Pang arawaraw na tala 10
Pang arawaraw na tala 10
 

Semelhante a Css (20)

css-ppt.pdf
css-ppt.pdfcss-ppt.pdf
css-ppt.pdf
 
CSS_Day_ONE (W3schools)
CSS_Day_ONE (W3schools)CSS_Day_ONE (W3schools)
CSS_Day_ONE (W3schools)
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0
 
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
 
css1.ppt
css1.pptcss1.ppt
css1.ppt
 
html-css
html-csshtml-css
html-css
 
Css
CssCss
Css
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
 
Css.prabu
Css.prabuCss.prabu
Css.prabu
 
Css
CssCss
Css
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
Css1
Css1Css1
Css1
 
Css(handbook)
Css(handbook)Css(handbook)
Css(handbook)
 
Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
 
CSS
CSSCSS
CSS
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Css introduction
Css introductionCss introduction
Css introduction
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Css

  • 1.
  • 2. Styles define how to display HTML elements
  • 3. Styles were added to HTML 4.0 to solve a problem
  • 4. External Style Sheets can save a lot of work
  • 5. External Style Sheets are stored in CSS files
  • 6.
  • 7. CSS Id and Class: The id Selector: The id selector is used to specify a style for a single, unique element. The id selector uses the id attribute of the HTML element, and is defined with a "#". The style rule below will be applied to the element with id="para1": #para1 { text-align:center; color:red; } The class Selector: The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements. This allows you to set a particular style for any HTML elements with the same class. The class selector uses the HTML class attribute, and is defined with a "." In the example below, all HTML elements with class="center" will be center-aligned: .center {text-align:center;} You can also specify that only specific HTML elements should be affected by a class. p.center {text-align:center;}
  • 8. CSS Background: Background Color: body {background-color:#b0c4de;} In the example below, the h1, p, and div elements have different background colors: The background color of a page is defined in the body selector: h1 {background-color:#6495ed;} p {background-color:#e0ffff;} div {background-color:#b0c4de;} Background Image: The background image for a page can be set like this: body {background-image:url('paper.gif');} body { background-image:url('gradient2.png'); background-repeat:repeat-x; } If the image is repeated only horizontally (repeat-x), the background will look better:
  • 9. CSS Text: Text Color: The default color for a page is defined in the body selector. body {color:blue;} h1 {color:#00ff00;} h2 {color:rgb(255,0,0);} Text Alignment: h1 {text-align:center;} p.date {text-align:right;} p.main {text-align:justify;} h1 {text-decoration:overline;} h2 {text-decoration:line-through;} h3 {text-decoration:underline;} h4 {text-decoration:blink;} Text Decoration:
  • 10. CSS Font: Font Family: p{font-family:"Times New Roman", Times, serif;} Font Style: p.normal {font-style:normal;} p.italic {font-style:italic;} p.oblique {font-style:oblique;} Font Size: h1 {font-size:40px;} h2 {font-size:30px;} p {font-size:14px;} Setting the text size with pixels, gives you full control over the text size This property has three values: normal - The text is shown normally italic - The text is shown in italics oblique - The text is "leaning" (oblique is very similar to italic, but less supported)
  • 11. Styling Links: CSS Links: The four links states are: a:link - a normal, unvisited link a:visited - a link the user has visited a:hover - a link when the user mouses over it a:active - a link the moment it is clicked a:link {color:#FF0000;}      /* unvisited link */ a:visited {color:#00FF00;}  /* visited link */ a:hover {color:#FF00FF;}  /* mouse over link */ a:active {color:#0000FF;}  /* selected link */ Text Decoration: The text-decoration property is mostly used to remove underlines from links: a:link {background-color:#B2FF99;} a:visited {background-color:#FFFF85;} a:hover {background-color:#FF704D;} a:active {background-color:#FF704D;}
  • 12. CSS Lists: List: In HTML, there are two types of lists: Unordered lists - the list items are marked with bullets Ordered lists - the list items are marked with numbers or letters Different List Item Markers: ul.a {list-style-type: circle;} ul.b {list-style-type: square;} ol.c {list-style-type: upper-roman;} ol.d {list-style-type: lower-alpha;} An Image as The List Item Marker: To specify an image as the list item marker, use the list-style-image property: ul { list-style-image: url('sqpurple.gif'); }
  • 13. CSS Tables: Table Borders: table, th, td { border: 1px solid black; } The example below specifies a black border for table, th, and td elements: Table Width and Height: The example below sets the width of the table to 100%, and the height of the th elements to 50px: table { width:100%; } th { height:50px; } Table Text Alignment: td { text-align:right; }