SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
Starting with CSS
What You Should Already Know
Before you continue you should have a basic understanding of the
following:
HTML / XHTML

What is CSS?
•CSS stands for Cascading Style Sheets
•Styles define how to display HTML elements
•Styles were added to HTML 4.0.
•External Style Sheets can save a lot of work
•External Style Sheets are stored in CSS files


 What the benefit of CSS?
Contents of Style Sheet
• A style sheet consists of a set of rules.
• Each rule consists of one or more selectors and a
  declaration block.
• A declaration block consists of a list of declarations in
  curly braces ({}).
• Each declaration consists of a property, a colon (:), a
  value, then a semi-colon (;).
Three Different Scopes of CSS
• Local
   – confined to a single element (tag)
• Internal
   – affect elements in an entire page
• External
   – can affect multiple pages
• Precedence
   – Local > Internal > External
CSS Selector
The id Selector                        The class Selector

•The id selector is used to            •The class selector is used to
specify a style for a single,          specify a style for a group of
unique element.                        elements. Unlike the id selector,
•The id selector uses the id           the class selector is most often
attribute of the HTML                  used on several elements.
element, and is defined with a         •This allows you to set a particular
"#".                                   style for many HTML elements with
                                       the same class.
                                       •The class selector uses the HTML
                                       class attribute, and is defined with
                                       a "."
Demo on a real HTML file in browser.
Background
Property           Description
                   Sets all the background properties in one
background
                   declaration
background-        Sets whether a background image is fixed or
attachment         scrolls with the rest of the page
background-color   Sets the background color of an element

background-image Sets the background image for an element

background-        Sets the starting position of a background
position           image

background-repeat Sets how a background image will be repeated
Text
Property        Description
color           Sets the color of text
text-align      Specifies the horizontal alignment of text

text-
                Specifies the decoration added to text
decoration

text-transform Controls the capitalization of text
Font
CSS font properties define the font family, boldness, size, and the style
of a text.
             Difference Between Serif and Sans-serif Fonts




 Generic family       Font family     Description
                      Times New
                                      Serif fonts have small lines at the
 Serif                Roman
                                      ends on some characters
                      Georgia
                                      "Sans" means without - these
                      Arial
 Sans-serif                           fonts do not have the lines at the
                      Verdana
                                      ends of characters
All CSS Font Properties
Property       Description

font           Sets all the font properties in one declaration

font-family    Specifies the font family for text

font-size      Specifies the font size of text

font-style     Specifies the font style for text

               Specifies whether or not a text should be
font-variant
               displayed in a small-caps font

font-weight    Specifies the weight of a font
Links & Lists
 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

  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
   The CSS list properties allow you to:
   •Set different list item markers for ordered lists
   •Set different list item markers for unordered lists
   •Set an image as the list item marker
Demo on a real HTML file in browser.
The CSS Box Model




Margin - Clears an area around the border. The margin does not have
a background color, it is completely transparent
Border - A border that goes around the padding and content. The
border is affected by the background color of the box
Padding - Clears an area around the content. The padding is affected
by the background color of the box
Content - The content of the box, where text and images appear
CSS Grouping & Nesting Selectors
     h1             p
     {              {
     color:green;
     }
                    color:blue;
     h2             text-align:center;
     {              }
     color:green;   .marked
     }              {
     p
     {
                    background-
     color:green;   color:red;
     }              }
                    .marked p
     h1,h2,p        {
     {              color:white;
     color:green;   }
     }
CSS Display and Visibility

The display property specifies if/how an element is displayed, and
the visibility property specifies if an element should be visible or
hidden.

Hiding an element can be done by setting the display property to
"none" or the visibility property to "hidden".

visibility:hidden hides an element, but it will still take up the same
space as before. The element will be hidden, but still affect the
layout.
display:none hides an element, and it will not take up any
space. The element will be hidden, and the page will be
displayed as if the element is not there
CSS Positioning
Name               Description
Static             HTML elements are positioned static by default. A
                   static positioned element is always positioned
                   according to the normal flow of the page.
Relative           A relative positioned element is positioned relative
                   to its normal position.
Absolute           An absolute position element is positioned relative
                   to the first parent element that has a position other
                   than static. If no such element is found, the
                   containing block is <html>
Fixed              An element with fixed position is positioned relative
                   to the browser window.
                   It will not move even if the window is scrolled.
Demo on a real HTML file in browser.
Stepping into CSS3
    Important Features:

    CSS3 Borders
    CSS3 Backgrounds
    CSS3 Text Effects
    CSS3 2D Transforms
    CSS3 3D Transforms
    CSS3 Transitions
    CSS3 Animations
    CSS3 Multiple Columns



Demo on a real HTML file in browser.
Some Demos in Practical




Reference : This presentation slide contains
the contents links from W3SCHOOL.
Link: http://www.w3schools.com/

Más contenido relacionado

La actualidad más candente

Responsive web design with html5 and css3
Responsive web design with html5 and css3Responsive web design with html5 and css3
Responsive web design with html5 and css3Divya Tiwari
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing worldRuss Weakley
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designersSingsys Pte Ltd
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSAmit Tyagi
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation Salman Memon
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introductionapnwebdev
 
CSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and moreCSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and moreRuss Weakley
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete NotesEPAM Systems
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1Jyoti Yadav
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpcasestudyhelp
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learnerYoeung Vibol
 
HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!Syahmi RH
 

La actualidad más candente (20)

Responsive web design with html5 and css3
Responsive web design with html5 and css3Responsive web design with html5 and css3
Responsive web design with html5 and css3
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Html
HtmlHtml
Html
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Css ppt
Css pptCss ppt
Css ppt
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Html css
Html cssHtml css
Html css
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
CSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and moreCSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and more
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learner
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
Css
CssCss
Css
 
HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 

Similar a Introduction 2 css

Similar a Introduction 2 css (20)

Css
CssCss
Css
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sass
 
Css
CssCss
Css
 
Css jon duckett - flashcards
Css   jon duckett - flashcardsCss   jon duckett - flashcards
Css jon duckett - flashcards
 
Basic css-tutorial
Basic css-tutorialBasic css-tutorial
Basic css-tutorial
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptx
 
2_css.pptx
2_css.pptx2_css.pptx
2_css.pptx
 
Web Typography
Web TypographyWeb Typography
Web Typography
 
Css from scratch
Css from scratchCss from scratch
Css from scratch
 
Journey To The Front End World - Part2 - The Cosmetic
Journey To The Front End World - Part2 - The  CosmeticJourney To The Front End World - Part2 - The  Cosmetic
Journey To The Front End World - Part2 - The Cosmetic
 
CSS
CSSCSS
CSS
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
css3.pptx
css3.pptxcss3.pptx
css3.pptx
 
Web technology
Web technologyWeb technology
Web technology
 
CSS Presentation Notes.pptx
CSS Presentation Notes.pptxCSS Presentation Notes.pptx
CSS Presentation Notes.pptx
 
Css Founder.com | Cssfounder in
Css Founder.com | Cssfounder inCss Founder.com | Cssfounder in
Css Founder.com | Cssfounder in
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 

Último

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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Introduction 2 css

  • 1. Starting with CSS What You Should Already Know Before you continue you should have a basic understanding of the following: HTML / XHTML What is CSS? •CSS stands for Cascading Style Sheets •Styles define how to display HTML elements •Styles were added to HTML 4.0. •External Style Sheets can save a lot of work •External Style Sheets are stored in CSS files What the benefit of CSS?
  • 2. Contents of Style Sheet • A style sheet consists of a set of rules. • Each rule consists of one or more selectors and a declaration block. • A declaration block consists of a list of declarations in curly braces ({}). • Each declaration consists of a property, a colon (:), a value, then a semi-colon (;).
  • 3. Three Different Scopes of CSS • Local – confined to a single element (tag) • Internal – affect elements in an entire page • External – can affect multiple pages • Precedence – Local > Internal > External
  • 4. CSS Selector The id Selector The class Selector •The id selector is used to •The class selector is used to specify a style for a single, specify a style for a group of unique element. elements. Unlike the id selector, •The id selector uses the id the class selector is most often attribute of the HTML used on several elements. element, and is defined with a •This allows you to set a particular "#". style for many HTML elements with the same class. •The class selector uses the HTML class attribute, and is defined with a "." Demo on a real HTML file in browser.
  • 5. Background Property Description Sets all the background properties in one background declaration background- Sets whether a background image is fixed or attachment scrolls with the rest of the page background-color Sets the background color of an element background-image Sets the background image for an element background- Sets the starting position of a background position image background-repeat Sets how a background image will be repeated
  • 6. Text Property Description color Sets the color of text text-align Specifies the horizontal alignment of text text- Specifies the decoration added to text decoration text-transform Controls the capitalization of text
  • 7. Font CSS font properties define the font family, boldness, size, and the style of a text. Difference Between Serif and Sans-serif Fonts Generic family Font family Description Times New Serif fonts have small lines at the Serif Roman ends on some characters Georgia "Sans" means without - these Arial Sans-serif fonts do not have the lines at the Verdana ends of characters
  • 8. All CSS Font Properties Property Description font Sets all the font properties in one declaration font-family Specifies the font family for text font-size Specifies the font size of text font-style Specifies the font style for text Specifies whether or not a text should be font-variant displayed in a small-caps font font-weight Specifies the weight of a font
  • 9. Links & Lists 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 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 The CSS list properties allow you to: •Set different list item markers for ordered lists •Set different list item markers for unordered lists •Set an image as the list item marker Demo on a real HTML file in browser.
  • 10. The CSS Box Model Margin - Clears an area around the border. The margin does not have a background color, it is completely transparent Border - A border that goes around the padding and content. The border is affected by the background color of the box Padding - Clears an area around the content. The padding is affected by the background color of the box Content - The content of the box, where text and images appear
  • 11. CSS Grouping & Nesting Selectors h1 p { { color:green; } color:blue; h2 text-align:center; { } color:green; .marked } { p { background- color:green; color:red; } } .marked p h1,h2,p { { color:white; color:green; } }
  • 12. CSS Display and Visibility The display property specifies if/how an element is displayed, and the visibility property specifies if an element should be visible or hidden. Hiding an element can be done by setting the display property to "none" or the visibility property to "hidden". visibility:hidden hides an element, but it will still take up the same space as before. The element will be hidden, but still affect the layout. display:none hides an element, and it will not take up any space. The element will be hidden, and the page will be displayed as if the element is not there
  • 13. CSS Positioning Name Description Static HTML elements are positioned static by default. A static positioned element is always positioned according to the normal flow of the page. Relative A relative positioned element is positioned relative to its normal position. Absolute An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is <html> Fixed An element with fixed position is positioned relative to the browser window. It will not move even if the window is scrolled. Demo on a real HTML file in browser.
  • 14. Stepping into CSS3 Important Features: CSS3 Borders CSS3 Backgrounds CSS3 Text Effects CSS3 2D Transforms CSS3 3D Transforms CSS3 Transitions CSS3 Animations CSS3 Multiple Columns Demo on a real HTML file in browser.
  • 15. Some Demos in Practical Reference : This presentation slide contains the contents links from W3SCHOOL. Link: http://www.w3schools.com/