SlideShare a Scribd company logo
css.ppt
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
BhasulaBhas.A.K
bhasula994@gmail.com
www.facebook.com/username
twitter.com/username
in.linkedin.com/in/profilename
12345656
topic
Cascading Style Sheet(CSS)
 A cascading style sheet(CSS) is a web page derived from
multiple sources with a defined order of precedence where
the definition of any style element conflict.
 CSS saves a lot of work
 CSS define how HTML elements are to be displayed
Syntax Of CSS
A CSS rule set consist of a selector and a declaration
block.
Selector Declaration Declaration
Property Value Property Value
• The selector points to the HTML element you want to style
• The Declaration block contains one or more declarations separated by semicolons.
• Each declaration includes a property name and a value, separated by a colon.
h1 {color: red; font-size:15px;}
Types Of CSS
There are 3 types of CSS styles declaration are as follows:
1. Internal(Embedded) Styles
2. Inline Styles
3. External Styles
Internal (Embedded)Styles
Internal styles are placed inside the head section of a particular web
page via the style tag. Internal styles are also called “Embedded” styles .
Inline Styles
Inline styles are placed directly inside an HTML element in the code.
External Styles
An external style sheet is a separate page which is then linked to the web
page.
CSS Selectors
CSS selectors allow you to select and manipulate HTML
elements.
CSS selectors are used to “find”(or select) HTML elements based
on their id,class,type,attribute,and more.
 The CSS selectors are follows:
1. Element Selector
2. ID Selector
3. Class Selector
4. Grouping Selector
• The Element Selector
The element selector selects elements based on the
element name.
Example
P{
text-align: center;
Color: red;
}
When we use above example, we get all<p> elements will be
center-aligned with a red text color.
• The id Selector
The id selector uses the id attribute of an HTML element to select a
specific element.
An id should be unique within a page, so the id selector is used if
you want to select a single,unique element.
To select an element with a specific id, write a hash(#)character,
followed by the id of the element.
The style rule below will be applied to the HTML element with
id=“paragraph”
Example
#paragraph{
text-align: center;
color: red;
}
• Class Selector
The class selector selects elements with a specific class
attribute.
To select elements with a specific class ,write a
period(.)character , followed by the name of the class
In the example below, all HTML elements with
class=”center” will be center-aligned
Example
.center{
text-aligned: center;
Color: red;
}
• Grouping Selectors
You can group the selectors , to minimize the code.
To group selectors , separate each selector with comma.
Example
h1,h2,h3,p{
text-align: center;
Color: red;
}
In the above example we have grouped some
selectors.
Example Program Of CSS
<html>
<head>
<style>
#tb
{
Border-radius:25px;
Width:200px;
Padding:20px;
}
</style>
</head>
<body>
<table border=1 id=“tb” cellpadding=“10px”>
<tr>
<th colspan=“3”><u>Student
Details</u></th>
</tr>
<tr>
<td>Name</td>
<td>Address</td>
<td>Phone Number</td>
</tr>
<tr>
<td>Athira</td>
<td>Keeripoyil(h)<br/>Mukkam</td>
<td>9946757413</td>
</tr>
<tr><td>Aswathi</td.
<td>Periyapurath(h)<br/.Kozhikode</td>
<td>9656368644</td></tr>
</body>
</html>
OUTPUT
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
Ad

More Related Content

What's hot (20)

CSS ppt
CSS pptCSS ppt
CSS ppt
Sanmuga Nathan
 
Css Ppt
Css PptCss Ppt
Css Ppt
Hema Prasanth
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Folasade Adedeji
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
Salman Memon
 
Css
CssCss
Css
shanmuga rajan
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
abhilashagupta
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 
Css selectors
Css selectorsCss selectors
Css selectors
Parth Trivedi
 
CSS notes
CSS notesCSS notes
CSS notes
Rajendra Prasad
 
html-css
html-csshtml-css
html-css
Dhirendra Chauhan
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
Aarti P
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 
Css position
Css positionCss position
Css position
Webtech Learning
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
Bedis ElAchèche
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
Amit Tyagi
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
Mai Moustafa
 
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)
Webtech Learning
 
Css
CssCss
Css
Manav Prasad
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
Salman Memon
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
abhilashagupta
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
Aarti P
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
Amit Tyagi
 
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)
Webtech Learning
 

Viewers also liked (15)

V Rss Mobile Ppt English
V Rss Mobile Ppt EnglishV Rss Mobile Ppt English
V Rss Mobile Ppt English
SpeechWorkers Sdn. Bhd.
 
Bring your own device
Bring your own deviceBring your own device
Bring your own device
C/D/H Technology Consultants
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
Amit Kumar Singh
 
Dropbox presentation
Dropbox presentationDropbox presentation
Dropbox presentation
Kenton Larsen
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
Gtu Booker
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
www.netgains.org
 
Java script ppt
Java script pptJava script ppt
Java script ppt
The Health and Social Care Information Centre
 
Drop Box Ppt
Drop Box PptDrop Box Ppt
Drop Box Ppt
guestd4ab1c7
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Jussi Pohjolainen
 
Js ppt
Js pptJs ppt
Js ppt
Rakhi Thota
 
Html Ppt
Html PptHtml Ppt
Html Ppt
vijayanit
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
MayaLisa
 
Elearning.ppt
Elearning.pptElearning.ppt
Elearning.ppt
Ashwin Kumar
 
Xml ppt
Xml pptXml ppt
Xml ppt
seemadav1
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computing
Rkrishna Mishra
 
Ad

Similar to css.ppt (20)

Css.html
Css.htmlCss.html
Css.html
Anaghabalakrishnan
 
Cascading Style Sheets (CSS) LEVELS.pptx
Cascading Style Sheets (CSS) LEVELS.pptxCascading Style Sheets (CSS) LEVELS.pptx
Cascading Style Sheets (CSS) LEVELS.pptx
DishaGudigar
 
introduction to CSS
introduction to CSSintroduction to CSS
introduction to CSS
Manish jariyal
 
Ia css
Ia  cssIa  css
Ia css
osman do
 
chitra
chitrachitra
chitra
sweet chitra
 
CSS_Day_ONE (W3schools)
CSS_Day_ONE (W3schools)CSS_Day_ONE (W3schools)
CSS_Day_ONE (W3schools)
Rafi Haidari
 
CSS Foundations, pt 1
CSS Foundations, pt 1CSS Foundations, pt 1
CSS Foundations, pt 1
Shawn Calvert
 
Web Development - Lecture 5
Web Development - Lecture 5Web Development - Lecture 5
Web Development - Lecture 5
Syed Shahzaib Sohail
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
GmachImen
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType Classification
ZahouAmel1
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
TusharTikia
 
Unit 2.1
Unit 2.1Unit 2.1
Unit 2.1
Abhishek Kesharwani
 
HTML CSS.pdf
HTML CSS.pdfHTML CSS.pdf
HTML CSS.pdf
ANKURAGARWAL252666
 
Lec 1
Lec 1Lec 1
Lec 1
maamir farooq
 
Unit 2.1
Unit 2.1Unit 2.1
Unit 2.1
Abhishek Kesharwani
 
CSS Overview
CSS OverviewCSS Overview
CSS Overview
Doncho Minkov
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
Web 101
Web 101Web 101
Web 101
OneDesignCompany
 
Introduction to Wed System And Technologies (1).pptx
Introduction to Wed System And Technologies (1).pptxIntroduction to Wed System And Technologies (1).pptx
Introduction to Wed System And Technologies (1).pptx
AmeerHamza183012
 
Html,Css,Js INTERNSHIP REPORT By SELF pptx
Html,Css,Js  INTERNSHIP REPORT By  SELF pptxHtml,Css,Js  INTERNSHIP REPORT By  SELF pptx
Html,Css,Js INTERNSHIP REPORT By SELF pptx
deepuranjankumar08
 
Ad

Recently uploaded (20)

All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 

css.ppt

  • 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. Cascading Style Sheet(CSS)  A cascading style sheet(CSS) is a web page derived from multiple sources with a defined order of precedence where the definition of any style element conflict.  CSS saves a lot of work  CSS define how HTML elements are to be displayed
  • 5. Syntax Of CSS A CSS rule set consist of a selector and a declaration block. Selector Declaration Declaration Property Value Property Value • The selector points to the HTML element you want to style • The Declaration block contains one or more declarations separated by semicolons. • Each declaration includes a property name and a value, separated by a colon. h1 {color: red; font-size:15px;}
  • 6. Types Of CSS There are 3 types of CSS styles declaration are as follows: 1. Internal(Embedded) Styles 2. Inline Styles 3. External Styles Internal (Embedded)Styles Internal styles are placed inside the head section of a particular web page via the style tag. Internal styles are also called “Embedded” styles . Inline Styles Inline styles are placed directly inside an HTML element in the code. External Styles An external style sheet is a separate page which is then linked to the web page.
  • 7. CSS Selectors CSS selectors allow you to select and manipulate HTML elements. CSS selectors are used to “find”(or select) HTML elements based on their id,class,type,attribute,and more.  The CSS selectors are follows: 1. Element Selector 2. ID Selector 3. Class Selector 4. Grouping Selector
  • 8. • The Element Selector The element selector selects elements based on the element name. Example P{ text-align: center; Color: red; } When we use above example, we get all<p> elements will be center-aligned with a red text color.
  • 9. • The id Selector The id selector uses the id attribute of an HTML element to select a specific element. An id should be unique within a page, so the id selector is used if you want to select a single,unique element. To select an element with a specific id, write a hash(#)character, followed by the id of the element. The style rule below will be applied to the HTML element with id=“paragraph” Example #paragraph{ text-align: center; color: red; }
  • 10. • Class Selector The class selector selects elements with a specific class attribute. To select elements with a specific class ,write a period(.)character , followed by the name of the class In the example below, all HTML elements with class=”center” will be center-aligned Example .center{ text-aligned: center; Color: red; }
  • 11. • Grouping Selectors You can group the selectors , to minimize the code. To group selectors , separate each selector with comma. Example h1,h2,h3,p{ text-align: center; Color: red; } In the above example we have grouped some selectors.
  • 12. Example Program Of CSS <html> <head> <style> #tb { Border-radius:25px; Width:200px; Padding:20px; } </style> </head> <body> <table border=1 id=“tb” cellpadding=“10px”> <tr> <th colspan=“3”><u>Student Details</u></th> </tr> <tr> <td>Name</td> <td>Address</td> <td>Phone Number</td> </tr> <tr> <td>Athira</td> <td>Keeripoyil(h)<br/>Mukkam</td> <td>9946757413</td> </tr> <tr><td>Aswathi</td. <td>Periyapurath(h)<br/.Kozhikode</td> <td>9656368644</td></tr> </body> </html>
  • 15. 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.
  • 16. 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
  翻译: