SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
Cascading Style Sheet

  www.eshikshak.co.in
Introduction to CSS
• CSS stands Cascading Style Sheets CSS
• It handles the look and feel part of a web page, like
   –   you can control the color of the text
   –   the style of fonts
   –   the spacing between paragraphs
   –   what background images or colors are used, as well as a
       variety of other effects.
• CSS is easy to learn and understand but it provides
  powerful control over the presentation of an HTML
  document. Most commonly, CSS is combined with the
  markup languages HTML or XHTML.

                          www.eshikshak.co.in
Advantages of CSS
•   CSS saves time - You can write CSS once and then reuse same sheet in multiple
    HTML pages. You can define a style for each HTML element and apply it to as
    many Web pages as you want.
•   Pages load faster - If you are using CSS, you do not need to write HTML tag
    attributes every time. Just write one CSS rule of a tag and apply to all the
    occurrences of that tag. So less code means faster download times.
•   Easy maintenance - To make a global change, simply change the style, and all
    elements in all the web pages will be updated automatically.
•   Superior styles to HTML - CSS has a much wider array of attributes than HTML
    so you can give far better look to your HTML page in comparison of HTML
    attributes.
•   Multiple Device Compatibility - Style sheets allow content to be optimized for
    more than one type of device. By using the same HTML document, different
    versions of a website can be presented for handheld devices such as PDAs and cell
    phones or for printing.
•   Global web standards - Now HTML attributes are being deprecated and it is being
    recommended to use CSS. So its a good idea to start using CSS in all the HTML
    pages to make them compatible to future browsers.


                                   www.eshikshak.co.in
Who Creates and Maintains
               CSS?
• CSS is created and maintained through a group of
  people within the W3C called the CSS Working
  Group.
• The CSS Working Group creates documents
  called specifications.
• When a specification has been discussed and
  officially ratified by W3C members, it becomes a
  recommendation.
• NOTE: The World Wide Web Consortium, or W3C is a group that makes
  recommendations about how the Internet works and how it should evolve.


                              www.eshikshak.co.in
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: A selector is an HTML tag at which style will be
     applied. This could be any tag like <h1> or <table> etc.
   – Property: A property is a type of attribute of HTML tag.
     Put simply, all the HTML attributes are converted into CSS
     properties. They could be color or border etc.
   – Value: Values are assigned to properties. For example
     color property can have value either red or #F1F1F1 etc.


                          www.eshikshak.co.in
Syntax
• You can put CSS Style Rule Syntax as follows


    selector                                       table
     {                                             {
          property: value;                            border :1px solid
     }                                             #C00; }




                             www.eshikshak.co.in
The Type Selectors

h1
{
  color: #36CFFF;
}


    to give a color to all level 1 headings :




                    www.eshikshak.co.in
The Descendant Selectors

       ul em {
         color: #000000;
       }


style rule will apply to <em> element only when it lies inside <ul>
tag.




                           www.eshikshak.co.in
The Class Selectors
• Define style rules based on the class attribute
  of the elements.
• All the elements having that class will be
  formatted according to the defined rule.

                    <p class="center bold">
.black {
                    This para will be styled by the classes
  color: #000000;
                    center and bold.
}
                    </p>

                    www.eshikshak.co.in
The ID Selectors
• Define style rules based on the id attribute of
  the elements.
• All the elements having that id will be
  formatted according to the defined rule.
 #black
 {
   color: #000000;
 }




                          www.eshikshak.co.in
The ID Selectors
• This rule renders the content in black for every
  element with id attribute set to black in our
  document. You can make it a bit more
  particular. For example:
              h1#black {
                color: #000000;
              }




                        www.eshikshak.co.in
The Attribute Selectors
• Apply styles to HTML elements with particular attributes.
• The style rule below will match all input elements that has a
  type attribute with a value of text.
• The advantage to this method is that the <input type="submit"
  /> element is unaffected, and the color applied only to the
  desired text fields.

   input[type="text"]
   {
     color: #000000;
   }

                          www.eshikshak.co.in
• There are following rules applied to attribute selector.
   – p[lang] - Selects all paragraph elements with a lang
     attribute.
   – p[lang="fr"] - Selects all paragraph elements whose lang
     attribute has a value of exactly "fr".
   – p[lang~="fr"] - Selects all paragraph elements whose lang
     attribute contains the word "fr".
   – p[lang|="en"] - Selects all paragraph elements whose lang
     attribute contains values that are exactly "en", or begin with
     "en-".


                            www.eshikshak.co.in
Multiple Style Rules
• You may need to define multiple style rules for a single
  element. You can define these rules to combine multiple
  properties and corresponding values into a single block as
  defined in the following example

                   h1
                   {
                   color: #36C;
                   font-weight: normal;
                   letter-spacing: .4em;
                   margin-bottom: 1em;
                   text-transform: lowercase;
                   }
                          www.eshikshak.co.in

Mais conteúdo relacionado

Mais procurados (20)

CSS.ppt
CSS.pptCSS.ppt
CSS.ppt
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML forms
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
CSS
CSSCSS
CSS
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Css font properties
Css font propertiesCss font properties
Css font properties
 
Flex box
Flex boxFlex box
Flex box
 
Html, CSS & Web Designing
Html, CSS & Web DesigningHtml, CSS & Web Designing
Html, CSS & Web Designing
 
Html frames
Html framesHtml frames
Html frames
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Css
CssCss
Css
 
Html Intro2
Html Intro2Html Intro2
Html Intro2
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
css.ppt
css.pptcss.ppt
css.ppt
 
Html forms
Html formsHtml forms
Html forms
 
Html1
Html1Html1
Html1
 
CSS ppt
CSS pptCSS ppt
CSS ppt
 
Html forms
Html formsHtml forms
Html forms
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 

Destaque

Lecture 11 css_inculsion
Lecture 11 css_inculsionLecture 11 css_inculsion
Lecture 11 css_inculsioneShikshak
 
Lecture 12 css_fonts
Lecture 12 css_fontsLecture 12 css_fonts
Lecture 12 css_fontseShikshak
 
Introduction to computer_and_its_structure
Introduction to computer_and_its_structureIntroduction to computer_and_its_structure
Introduction to computer_and_its_structureeShikshak
 
Program development cyle
Program development cyleProgram development cyle
Program development cyleeShikshak
 
Lecturer23 pointersin c.ppt
Lecturer23 pointersin c.pptLecturer23 pointersin c.ppt
Lecturer23 pointersin c.ppteShikshak
 
Computer programming programming_langugages
Computer programming programming_langugagesComputer programming programming_langugages
Computer programming programming_langugageseShikshak
 
Mesics lecture 8 arrays in 'c'
Mesics lecture 8   arrays in 'c'Mesics lecture 8   arrays in 'c'
Mesics lecture 8 arrays in 'c'eShikshak
 
Unit 1.3 types of cloud
Unit 1.3 types of cloudUnit 1.3 types of cloud
Unit 1.3 types of cloudeShikshak
 
Unit 1.1 introduction to cloud computing
Unit 1.1   introduction to cloud computingUnit 1.1   introduction to cloud computing
Unit 1.1 introduction to cloud computingeShikshak
 
Lecture19 unionsin c.ppt
Lecture19 unionsin c.pptLecture19 unionsin c.ppt
Lecture19 unionsin c.ppteShikshak
 
Unit 1.2 move to cloud computing
Unit 1.2   move to cloud computingUnit 1.2   move to cloud computing
Unit 1.2 move to cloud computingeShikshak
 
Introduction to multimedia
Introduction to multimediaIntroduction to multimedia
Introduction to multimediaeShikshak
 
Unit 1.4 working of cloud computing
Unit 1.4 working of cloud computingUnit 1.4 working of cloud computing
Unit 1.4 working of cloud computingeShikshak
 
Language processors
Language processorsLanguage processors
Language processorseShikshak
 

Destaque (15)

Lecture 11 css_inculsion
Lecture 11 css_inculsionLecture 11 css_inculsion
Lecture 11 css_inculsion
 
Lecture 12 css_fonts
Lecture 12 css_fontsLecture 12 css_fonts
Lecture 12 css_fonts
 
Introduction to computer_and_its_structure
Introduction to computer_and_its_structureIntroduction to computer_and_its_structure
Introduction to computer_and_its_structure
 
Program development cyle
Program development cyleProgram development cyle
Program development cyle
 
Lecturer23 pointersin c.ppt
Lecturer23 pointersin c.pptLecturer23 pointersin c.ppt
Lecturer23 pointersin c.ppt
 
Computer programming programming_langugages
Computer programming programming_langugagesComputer programming programming_langugages
Computer programming programming_langugages
 
Mesics lecture 8 arrays in 'c'
Mesics lecture 8   arrays in 'c'Mesics lecture 8   arrays in 'c'
Mesics lecture 8 arrays in 'c'
 
Unit 1.3 types of cloud
Unit 1.3 types of cloudUnit 1.3 types of cloud
Unit 1.3 types of cloud
 
Unit 1.1 introduction to cloud computing
Unit 1.1   introduction to cloud computingUnit 1.1   introduction to cloud computing
Unit 1.1 introduction to cloud computing
 
Lecture19 unionsin c.ppt
Lecture19 unionsin c.pptLecture19 unionsin c.ppt
Lecture19 unionsin c.ppt
 
Unit 1.2 move to cloud computing
Unit 1.2   move to cloud computingUnit 1.2   move to cloud computing
Unit 1.2 move to cloud computing
 
Introduction to multimedia
Introduction to multimediaIntroduction to multimedia
Introduction to multimedia
 
Html forms
Html formsHtml forms
Html forms
 
Unit 1.4 working of cloud computing
Unit 1.4 working of cloud computingUnit 1.4 working of cloud computing
Unit 1.4 working of cloud computing
 
Language processors
Language processorsLanguage processors
Language processors
 

Semelhante a Introduction to css (20)

Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)
 
Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxCascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
 
Unit 2.1
Unit 2.1Unit 2.1
Unit 2.1
 
Unit 2.1
Unit 2.1Unit 2.1
Unit 2.1
 
DHTML
DHTMLDHTML
DHTML
 
Css
CssCss
Css
 
Csstutorial
CsstutorialCsstutorial
Csstutorial
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
 
Css - Tutorial
Css - TutorialCss - Tutorial
Css - Tutorial
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Css
CssCss
Css
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptx
 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
Css tutorial by viveksingh698@gmail.com
Css tutorial by viveksingh698@gmail.comCss tutorial by viveksingh698@gmail.com
Css tutorial by viveksingh698@gmail.com
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
 
Css tutorial
Css tutorial Css tutorial
Css tutorial
 
Week11 Lecture: CSS
Week11 Lecture: CSSWeek11 Lecture: CSS
Week11 Lecture: CSS
 
Castro Chapter 7
Castro Chapter 7Castro Chapter 7
Castro Chapter 7
 
Css
CssCss
Css
 

Mais de eShikshak

Modelling and evaluation
Modelling and evaluationModelling and evaluation
Modelling and evaluationeShikshak
 
Operators in python
Operators in pythonOperators in python
Operators in pythoneShikshak
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in pythoneShikshak
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythoneShikshak
 
Introduction to e commerce
Introduction to e commerceIntroduction to e commerce
Introduction to e commerceeShikshak
 
Chapeter 2 introduction to cloud computing
Chapeter 2   introduction to cloud computingChapeter 2   introduction to cloud computing
Chapeter 2 introduction to cloud computingeShikshak
 
Mesics lecture files in 'c'
Mesics lecture   files in 'c'Mesics lecture   files in 'c'
Mesics lecture files in 'c'eShikshak
 
Mesics lecture 7 iteration and repetitive executions
Mesics lecture 7   iteration and repetitive executionsMesics lecture 7   iteration and repetitive executions
Mesics lecture 7 iteration and repetitive executionseShikshak
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’eShikshak
 
Mesics lecture 6 control statement = if -else if__else
Mesics lecture 6   control statement = if -else if__elseMesics lecture 6   control statement = if -else if__else
Mesics lecture 6 control statement = if -else if__elseeShikshak
 
Mesics lecture 4 c operators and experssions
Mesics lecture  4   c operators and experssionsMesics lecture  4   c operators and experssions
Mesics lecture 4 c operators and experssionseShikshak
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’eShikshak
 
Mesics lecture 3 c – constants and variables
Mesics lecture 3   c – constants and variablesMesics lecture 3   c – constants and variables
Mesics lecture 3 c – constants and variableseShikshak
 
Lecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operatorsLecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operatorseShikshak
 
Lecture21 categoriesof userdefinedfunctions.ppt
Lecture21 categoriesof userdefinedfunctions.pptLecture21 categoriesof userdefinedfunctions.ppt
Lecture21 categoriesof userdefinedfunctions.ppteShikshak
 
Lecture20 user definedfunctions.ppt
Lecture20 user definedfunctions.pptLecture20 user definedfunctions.ppt
Lecture20 user definedfunctions.ppteShikshak
 
Lecture18 structurein c.ppt
Lecture18 structurein c.pptLecture18 structurein c.ppt
Lecture18 structurein c.ppteShikshak
 
Lecture17 arrays.ppt
Lecture17 arrays.pptLecture17 arrays.ppt
Lecture17 arrays.ppteShikshak
 
Lecture15 comparisonoftheloopcontrolstructures.ppt
Lecture15 comparisonoftheloopcontrolstructures.pptLecture15 comparisonoftheloopcontrolstructures.ppt
Lecture15 comparisonoftheloopcontrolstructures.ppteShikshak
 
Lecture13 control statementswitch.ppt
Lecture13 control statementswitch.pptLecture13 control statementswitch.ppt
Lecture13 control statementswitch.ppteShikshak
 

Mais de eShikshak (20)

Modelling and evaluation
Modelling and evaluationModelling and evaluation
Modelling and evaluation
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to e commerce
Introduction to e commerceIntroduction to e commerce
Introduction to e commerce
 
Chapeter 2 introduction to cloud computing
Chapeter 2   introduction to cloud computingChapeter 2   introduction to cloud computing
Chapeter 2 introduction to cloud computing
 
Mesics lecture files in 'c'
Mesics lecture   files in 'c'Mesics lecture   files in 'c'
Mesics lecture files in 'c'
 
Mesics lecture 7 iteration and repetitive executions
Mesics lecture 7   iteration and repetitive executionsMesics lecture 7   iteration and repetitive executions
Mesics lecture 7 iteration and repetitive executions
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’
 
Mesics lecture 6 control statement = if -else if__else
Mesics lecture 6   control statement = if -else if__elseMesics lecture 6   control statement = if -else if__else
Mesics lecture 6 control statement = if -else if__else
 
Mesics lecture 4 c operators and experssions
Mesics lecture  4   c operators and experssionsMesics lecture  4   c operators and experssions
Mesics lecture 4 c operators and experssions
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’
 
Mesics lecture 3 c – constants and variables
Mesics lecture 3   c – constants and variablesMesics lecture 3   c – constants and variables
Mesics lecture 3 c – constants and variables
 
Lecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operatorsLecture 7 relational_and_logical_operators
Lecture 7 relational_and_logical_operators
 
Lecture21 categoriesof userdefinedfunctions.ppt
Lecture21 categoriesof userdefinedfunctions.pptLecture21 categoriesof userdefinedfunctions.ppt
Lecture21 categoriesof userdefinedfunctions.ppt
 
Lecture20 user definedfunctions.ppt
Lecture20 user definedfunctions.pptLecture20 user definedfunctions.ppt
Lecture20 user definedfunctions.ppt
 
Lecture18 structurein c.ppt
Lecture18 structurein c.pptLecture18 structurein c.ppt
Lecture18 structurein c.ppt
 
Lecture17 arrays.ppt
Lecture17 arrays.pptLecture17 arrays.ppt
Lecture17 arrays.ppt
 
Lecture15 comparisonoftheloopcontrolstructures.ppt
Lecture15 comparisonoftheloopcontrolstructures.pptLecture15 comparisonoftheloopcontrolstructures.ppt
Lecture15 comparisonoftheloopcontrolstructures.ppt
 
Lecture13 control statementswitch.ppt
Lecture13 control statementswitch.pptLecture13 control statementswitch.ppt
Lecture13 control statementswitch.ppt
 

Último

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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
 

Último (20)

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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, ...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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...
 

Introduction to css

  • 1. Cascading Style Sheet www.eshikshak.co.in
  • 2. Introduction to CSS • CSS stands Cascading Style Sheets CSS • It handles the look and feel part of a web page, like – you can control the color of the text – the style of fonts – the spacing between paragraphs – what background images or colors are used, as well as a variety of other effects. • CSS is easy to learn and understand but it provides powerful control over the presentation of an HTML document. Most commonly, CSS is combined with the markup languages HTML or XHTML. www.eshikshak.co.in
  • 3. Advantages of CSS • CSS saves time - You can write CSS once and then reuse same sheet in multiple HTML pages. You can define a style for each HTML element and apply it to as many Web pages as you want. • Pages load faster - If you are using CSS, you do not need to write HTML tag attributes every time. Just write one CSS rule of a tag and apply to all the occurrences of that tag. So less code means faster download times. • Easy maintenance - To make a global change, simply change the style, and all elements in all the web pages will be updated automatically. • Superior styles to HTML - CSS has a much wider array of attributes than HTML so you can give far better look to your HTML page in comparison of HTML attributes. • Multiple Device Compatibility - Style sheets allow content to be optimized for more than one type of device. By using the same HTML document, different versions of a website can be presented for handheld devices such as PDAs and cell phones or for printing. • Global web standards - Now HTML attributes are being deprecated and it is being recommended to use CSS. So its a good idea to start using CSS in all the HTML pages to make them compatible to future browsers. www.eshikshak.co.in
  • 4. Who Creates and Maintains CSS? • CSS is created and maintained through a group of people within the W3C called the CSS Working Group. • The CSS Working Group creates documents called specifications. • When a specification has been discussed and officially ratified by W3C members, it becomes a recommendation. • NOTE: The World Wide Web Consortium, or W3C is a group that makes recommendations about how the Internet works and how it should evolve. www.eshikshak.co.in
  • 5. 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: A selector is an HTML tag at which style will be applied. This could be any tag like <h1> or <table> etc. – Property: A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color or border etc. – Value: Values are assigned to properties. For example color property can have value either red or #F1F1F1 etc. www.eshikshak.co.in
  • 6. Syntax • You can put CSS Style Rule Syntax as follows selector table { { property: value; border :1px solid } #C00; } www.eshikshak.co.in
  • 7. The Type Selectors h1 { color: #36CFFF; } to give a color to all level 1 headings : www.eshikshak.co.in
  • 8. The Descendant Selectors ul em { color: #000000; } style rule will apply to <em> element only when it lies inside <ul> tag. www.eshikshak.co.in
  • 9. The Class Selectors • Define style rules based on the class attribute of the elements. • All the elements having that class will be formatted according to the defined rule. <p class="center bold"> .black { This para will be styled by the classes color: #000000; center and bold. } </p> www.eshikshak.co.in
  • 10. The ID Selectors • Define style rules based on the id attribute of the elements. • All the elements having that id will be formatted according to the defined rule. #black { color: #000000; } www.eshikshak.co.in
  • 11. The ID Selectors • This rule renders the content in black for every element with id attribute set to black in our document. You can make it a bit more particular. For example: h1#black { color: #000000; } www.eshikshak.co.in
  • 12. The Attribute Selectors • Apply styles to HTML elements with particular attributes. • The style rule below will match all input elements that has a type attribute with a value of text. • The advantage to this method is that the <input type="submit" /> element is unaffected, and the color applied only to the desired text fields. input[type="text"] { color: #000000; } www.eshikshak.co.in
  • 13. • There are following rules applied to attribute selector. – p[lang] - Selects all paragraph elements with a lang attribute. – p[lang="fr"] - Selects all paragraph elements whose lang attribute has a value of exactly "fr". – p[lang~="fr"] - Selects all paragraph elements whose lang attribute contains the word "fr". – p[lang|="en"] - Selects all paragraph elements whose lang attribute contains values that are exactly "en", or begin with "en-". www.eshikshak.co.in
  • 14. Multiple Style Rules • You may need to define multiple style rules for a single element. You can define these rules to combine multiple properties and corresponding values into a single block as defined in the following example h1 { color: #36C; font-weight: normal; letter-spacing: .4em; margin-bottom: 1em; text-transform: lowercase; } www.eshikshak.co.in