SlideShare a Scribd company logo
WEB TECHNOLOGIES
WEB DESIGNING
CSS
What is CSS ?
CSS (Cascading Style Sheets) is used to style and layout web pages — for example,
to alter the font, color, size, and spacing of your content, split it into multiple
columns, or add animations and other decorative features.
CSS is the language we use to style an HTML document.CSS describes how HTML elements
should be displayed.
CSS SIMPLE CODE
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: lightblue;}
h1 {color:
white; text-align:
center;}
p { font-family: verdana;font-size: 20px;}
</style>
</head>
<body>
<h1>My First CSS Example</h1>
<p>This is a paragraph.</p>
</body>
</html>
CSS SELECTORS
The CSS element Selector
The element selector selects HTML elements based on the element name.
Example:
Here, all <p> elements on the page will be center-aligned, with a redtext color:
p {
text-align: center;color: red;
}
The CSS id Selector
The id selector uses the id attribute of an HTML element to select a specific
element.
The id of an element is unique within a page, so the id selector is used toselect
one unique element!
To select an element with a specific id, write a hash (#) character, followedby the
id of the element.
CSS SELECTORS
Example:
<!DOCTYPE html>
<html>
<head>
<style> #para1 {text-align:
center; color: red; }
</style>
</head>
<body>
<p id="para1">Hello World!</p>
<p>This paragraph is not affected by the style.</p>
</body>
</html>
CSS BOX MODEL
In CSS, the term "box model" is used when talking about design and layout.The CSS box
model is essentially a box that wraps around every HTML element. It consists of: margins,
borders, padding, and the actual content. The image below illustrates the box model
Explanation of the different parts:
• Content - The content of the box, where text and
images appear
• Padding - Clears an area around the
content. The padding istransparent
• Border - A border that goes around the padding and
content
• Margin - Clears an area outside the
border. The margin istransparent.
CSS BACKGROUND PROPERTIES
Background Properties:
The CSS background properties are used to add background effects forelements.
CSS background properties:
• background-color
• background-image
• background-repeat
• background-attachment
• background-position
CSS BACKGROUND PROPERTIES
The background color of a page is set likethis: Example body {
background-color: lightblue;
}
Otherelementsh1 {
background-color: green;
}
div {
background-color: lightblue;
}
p {
background-color:
yellow; }
CSS ANIMATIONS
CSS allows animation of HTML elements without using JavaScript or Flash!The
properties are
• @keyframes
• animation-name
• animation-duration
• animation-delay
• animation-iteration-count
• animation-direction
• animation-timing-function
• animation-fill-mode
• animation
CSS ANIMATIONS
Example
/* The animation code */ @keyframes example { from
{background-color:red;} to {background-color: yellow;}
}
/* The element to apply the animationto */ div
{ width: 100px; height:100px;
background-color: red;animation-name: example;
animation-duration: 4s;
}
CSS ANIMATIONS
The animation-delay property specifies a delay for the start of ananimation.
The following example has a 2 seconds delay before startingthe animation:
Example
div {width: 100px;
height:100px;
position:relative;
background-color: red;
animation-name:example;
animation-duration:4s; animation-delay:2s;}
WT  CSS

More Related Content

PPTX
CSS tutorial chapter 1
jeweltutin
 
PPTX
CSS Basics part One
M Ashraful Islam Jewel
 
PPTX
html-css
Dhirendra Chauhan
 
PPTX
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
PPTX
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
PDF
Unit 3 (it workshop).pptx
Dr.Lokesh Gagnani
 
PPTX
Css ppt
Nidhi mishra
 
PPTX
Cascading style sheet, CSS Box model, Table in CSS
SherinRappai
 
CSS tutorial chapter 1
jeweltutin
 
CSS Basics part One
M Ashraful Islam Jewel
 
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
Unit 3 (it workshop).pptx
Dr.Lokesh Gagnani
 
Css ppt
Nidhi mishra
 
Cascading style sheet, CSS Box model, Table in CSS
SherinRappai
 

Similar to WT CSS (20)

PPTX
CSS
DivyaKS12
 
PPTX
Web topic 15 1 basic css layout
CK Yang
 
PPT
working with internet technologies using CSS
nazimsattar
 
PPTX
diffrent style sheets like cascading style sheets.pptx
ssuser46d915
 
PPTX
Html Styles-CSS
ispkosova
 
PPTX
Introduction to Wed System And Technologies (1).pptx
AmeerHamza183012
 
PPTX
Casecading Style Sheets for Hyper Text Transfer Protocol.pptx
usmanahmadawan
 
PPTX
session2 cascading style sheet course.pptx
mostafaalgendy3
 
PPTX
session2 css cascade style sheet course.pptx
mostafaalgendy3
 
PPTX
session2_cascading_style_sheet_cssc.pptx
mostafaalgendy3
 
PPTX
Introduction to CSS
Ameer Khan
 
PPTX
Lecture-6.pptx
vishal choudhary
 
PPTX
CSS_Day_ONE (W3schools)
Rafi Haidari
 
PPTX
CSS Topic wise Short notes ppt by Navya.E
NavyaEnugala
 
DOC
Css introduction
vishnu murthy
 
PPTX
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
eyasu6
 
PPTX
Unit 2 Internet and web technology CSS report
ajaysahusistec
 
PPTX
CSS (Cascading Style Sheet)
PumoTechnovation
 
Web topic 15 1 basic css layout
CK Yang
 
working with internet technologies using CSS
nazimsattar
 
diffrent style sheets like cascading style sheets.pptx
ssuser46d915
 
Html Styles-CSS
ispkosova
 
Introduction to Wed System And Technologies (1).pptx
AmeerHamza183012
 
Casecading Style Sheets for Hyper Text Transfer Protocol.pptx
usmanahmadawan
 
session2 cascading style sheet course.pptx
mostafaalgendy3
 
session2 css cascade style sheet course.pptx
mostafaalgendy3
 
session2_cascading_style_sheet_cssc.pptx
mostafaalgendy3
 
Introduction to CSS
Ameer Khan
 
Lecture-6.pptx
vishal choudhary
 
CSS_Day_ONE (W3schools)
Rafi Haidari
 
CSS Topic wise Short notes ppt by Navya.E
NavyaEnugala
 
Css introduction
vishnu murthy
 
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
eyasu6
 
Unit 2 Internet and web technology CSS report
ajaysahusistec
 
CSS (Cascading Style Sheet)
PumoTechnovation
 
Ad

Recently uploaded (20)

PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PDF
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PDF
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
PPTX
Tunnel Ventilation System in Kanpur Metro
220105053
 
PPTX
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PDF
Natural_Language_processing_Unit_I_notes.pdf
sanguleumeshit
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PPTX
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
quantum computing transition from classical mechanics.pptx
gvlbcy
 
PPTX
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
PPT
Understanding the Key Components and Parts of a Drone System.ppt
Siva Reddy
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PPTX
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
PDF
Chad Ayach - A Versatile Aerospace Professional
Chad Ayach
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
Tunnel Ventilation System in Kanpur Metro
220105053
 
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
Natural_Language_processing_Unit_I_notes.pdf
sanguleumeshit
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
quantum computing transition from classical mechanics.pptx
gvlbcy
 
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
Understanding the Key Components and Parts of a Drone System.ppt
Siva Reddy
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
Chad Ayach - A Versatile Aerospace Professional
Chad Ayach
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
Ad

WT CSS

  • 3. CSS What is CSS ? CSS (Cascading Style Sheets) is used to style and layout web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features. CSS is the language we use to style an HTML document.CSS describes how HTML elements should be displayed.
  • 4. CSS SIMPLE CODE <!DOCTYPE html> <html> <head> <style> body {background-color: lightblue;} h1 {color: white; text-align: center;} p { font-family: verdana;font-size: 20px;} </style> </head> <body> <h1>My First CSS Example</h1> <p>This is a paragraph.</p> </body> </html>
  • 5. CSS SELECTORS The CSS element Selector The element selector selects HTML elements based on the element name. Example: Here, all <p> elements on the page will be center-aligned, with a redtext color: p { text-align: center;color: red; } The CSS id Selector The id selector uses the id attribute of an HTML element to select a specific element. The id of an element is unique within a page, so the id selector is used toselect one unique element! To select an element with a specific id, write a hash (#) character, followedby the id of the element.
  • 6. CSS SELECTORS Example: <!DOCTYPE html> <html> <head> <style> #para1 {text-align: center; color: red; } </style> </head> <body> <p id="para1">Hello World!</p> <p>This paragraph is not affected by the style.</p> </body> </html>
  • 7. CSS BOX MODEL In CSS, the term "box model" is used when talking about design and layout.The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content. The image below illustrates the box model Explanation of the different parts: • Content - The content of the box, where text and images appear • Padding - Clears an area around the content. The padding istransparent • Border - A border that goes around the padding and content • Margin - Clears an area outside the border. The margin istransparent.
  • 8. CSS BACKGROUND PROPERTIES Background Properties: The CSS background properties are used to add background effects forelements. CSS background properties: • background-color • background-image • background-repeat • background-attachment • background-position
  • 9. CSS BACKGROUND PROPERTIES The background color of a page is set likethis: Example body { background-color: lightblue; } Otherelementsh1 { background-color: green; } div { background-color: lightblue; } p { background-color: yellow; }
  • 10. CSS ANIMATIONS CSS allows animation of HTML elements without using JavaScript or Flash!The properties are • @keyframes • animation-name • animation-duration • animation-delay • animation-iteration-count • animation-direction • animation-timing-function • animation-fill-mode • animation
  • 11. CSS ANIMATIONS Example /* The animation code */ @keyframes example { from {background-color:red;} to {background-color: yellow;} } /* The element to apply the animationto */ div { width: 100px; height:100px; background-color: red;animation-name: example; animation-duration: 4s; }
  • 12. CSS ANIMATIONS The animation-delay property specifies a delay for the start of ananimation. The following example has a 2 seconds delay before startingthe animation: Example div {width: 100px; height:100px; position:relative; background-color: red; animation-name:example; animation-duration:4s; animation-delay:2s;}