SlideShare une entreprise Scribd logo
1  sur  23
iFour ConsultancyCascading Style Sheet (CSS)
Cascading Style Sheets (CSS)
 Cascading Style Sheets (CSS)
• Used to describe the presentation of documents
• Define sizes, spacing, fonts, colors, layout, etc.
• Improve content accessibility and flexibility
 Designed to separate presentation from content.
 CSS style sheets are the modern way to control the appearance and layout of your web pages.
 4.0 and up Navigator and IE fully support CSS.
 They are used to control how elements are presented in the Web page
 Work with the common visual browsers (Internet Explorer, Firefox, Opera)
 Used properly, can great simplify visual design, site management and content maintenance
Web Development Company Indiahttp://www.ifourtechnolab.com
Style Sheets Syntax
Style sheets consist of rules, selectors, declarations, properties and
values
Selectors are separated by commas
Declarations are separated by semicolons
Properties and values are separated by colons
h1,h2,h3 { color: green; font-weight: bold; }
Web Development Company Indiahttp://www.ifourtechnolab.com
Selectors
Selectors determine which element the rule applies to:
• All elements of specific type (tag)
• Those that mach a specific attribute (id, class)
• Elements may be matched depending on how they are nested in the document tree
(HTML)
 Examples:
.header a { color: green }
#menu>li { padding-top: 8px }
Web Development Company Indiahttp://www.ifourtechnolab.com
Selectors
 Three primary kinds of selectors:
• By tag (type selector):
• By element id:
• By element class name (only for HTML):
 Selectors can be combined with commas:
This will match <h1> tags, elements with class link, and element with id top-link
h1 { font-family: verdana,sans-serif; }
#element_id { color: #ff0000; }
.myClass {border: 1px solid red}
h1, .link, #top-link {font-weight: bold}
Web Development Company Indiahttp://www.ifourtechnolab.com
Selectors
Pseudo-classes define state
• :hover, :visited, :active , :lang
 Pseudo-elements define element "parts" or are used to generate content
• :first-line , :before, :after
a:hover { color: red; }
p:first-line { text-transform: uppercase; }
.title:before { content: "»"; }
.title:after { content: "«"; }
Web Development Company Indiahttp://www.ifourtechnolab.com
Selectors
Match relative to element placement:
This will match all <a> tags that are inside of <p>
* – universal selector (avoid or use with care!):
This will match all descendants of <p> element
+ selector – used to match “next sibling”:
This will match all siblings with class name link that appear immediately after <img>
tag
p a {text-decoration: underline}
p * {color: black}
img + .link {float:right}
Web Development Company Indiahttp://www.ifourtechnolab.com
Selectors
> selector – matches direct child nodes:
This will match all elements with class error, direct children of <p> tag
[ ] – matches tag attributes by regular expression:
This will match all <img> tags with alt attribute containing the word logo
.class1.class2 (no space) - matches elements with both (all) classes
applied at the same time
p > .error {font-size: 8px}
img[alt~=logo] {border: none}
Web Development Company Indiahttp://www.ifourtechnolab.com
Values in the CSS Rules
Colors are set in RGB format (decimal or hex):
• Example: #a0a6aa = rgb(160, 166, 170)
• Predefined color aliases exist: black, blue, etc.
Numeric values are specified in:
• Pixels, ems, e.g. 12px , 1.4em
• Points, inches, centimeters, millimeters
• E.g. 10pt , 1in, 1cm, 1mm
• Percentages, e.g. 50%
• Percentage of what?...
• Zero can be used with no unit: border: 0;
Web Development Company Indiahttp://www.ifourtechnolab.com
Linking HTML and CSS
HTML (content) and CSS (presentation) can be linked in three ways:
• Inline: the CSS rules in the style attribute
• No selectors are needed
• Embedded: in the <head> in a <style> tag
• External: CSS rules in separate file (best)
• Usually a file with .css extension
• Linked via <link rel="stylesheet" href=…> tag or @import directive in
embedded CSS block
Web Development Company Indiahttp://www.ifourtechnolab.com
Linking HTML and CSS
Using external files is highly recommended
• Simplifies the HTML document
• Improves page load speed as the CSS file is cached
Web Development Company Indiahttp://www.ifourtechnolab.com
Inline Styles: Example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Inline Styles</title>
</head>
<body>
<p>Here is some text</p>
<!--Separate multiple styles with a semicolon-->
<p style="font-size: 20pt">Here is some
more text</p>
<p style="font-size: 20pt;color:
#0000FF" >Even more text</p>
</body>
</html>
inline-styles.html
Web Development Company Indiahttp://www.ifourtechnolab.com
External CSS Styles
External linking
• Separate pages can all use a shared style sheet
• Only modify a single file to change the styles across your entire Web site (see
http://www.csszengarden.com/)
link tag (with a rel attribute)
• Specifies a relationship between current document and another document
• link elements should be in the <head>
<link rel="stylesheet" type="text/css"
href="styles.css">
Web Development Company Indiahttp://www.ifourtechnolab.com
External CSS Styles: Example
/* CSS Document */
a { text-decoration: none }
a:hover { text-decoration: underline;
color: red;
background-color: #CCFFCC }
li em { color: red;
font-weight: bold }
ul { margin-left: 2cm }
ul ul { text-decoration: underline;
margin-left: .5cm }
styles.css
Web Development Company Indiahttp://www.ifourtechnolab.com
Text-related CSS Properties
color – specifies the color of the text
font-size – size of font: xx-small, x-small, small, medium, large,
x-large, xx-large, smaller, larger or numeric value
font-family – comma separated font names
• Example: verdana, sans-serif, etc.
• The browser loads the first one that is available
• There should always be at least one generic font
font-weight can be normal, bold, bolder, lighter or a number in
range [100 … 900]
Web Development Company Indiahttp://www.ifourtechnolab.com
CSS Rules for Fonts
font-style – styles the font
• Values: normal, italic, oblique
text-decoration – decorates the text
• Values: none, underline, line-trough, overline, blink
text-align – defines the alignment of text or other content
• Values: left, right, center, justify
Web Development Company Indiahttp://www.ifourtechnolab.com
Backgrounds
background-image
• URL of image to be used as background, e.g.:
background-color
• Using color and image and the same time
background-repeat
• repeat-x, repeat-y, repeat, no-repeat
background-attachment
• fixed / scroll
background-image:url("back.gif");
Web Development Company Indiahttp://www.ifourtechnolab.com
Borders
border-width: thin, medium, thick or numerical value (e.g. 10px)
border-color: color alias or RGB value
border-style: none, hidden, dotted, dashed, solid, double,
groove, ridge, inset, outset
Each property can be defined separately for left, top, bottom and right
• border-top-style, border-left-color, …
Web Development Company Indiahttp://www.ifourtechnolab.com
Width and Height
width – defines numerical value for the width of element, e.g. 200px
height – defines numerical value for the height of element, e.g. 100px
• By default the height of an element is defined by its content
• Inline elements do not apply height, unless you change their display style.
Web Development Company Indiahttp://www.ifourtechnolab.com
Margin and Padding
margin and padding define the spacing around the element
• Numerical value, e.g. 10px or -5px
• Can be defined for each of the four sides separately - margin-top, padding-left,
…
• margin is the spacing outside of the border
• padding is the spacing between the border and the content
• What are collapsing margins?
Web Development Company Indiahttp://www.ifourtechnolab.com
Float
float: the element “floats” to one side
• left: places the element on the left and following content on the right
• right: places the element on the right and following content on the left
• floated elements should come before the content that will wrap around them in the
code
• margins of floated elements do not collapse
• floated inline elements can apply height
Web Development Company Indiahttp://www.ifourtechnolab.com
Benefits of using CSS
More powerful formatting than using presentation tags
Your pages load faster, because browsers cache the .css files
Increased accessibility, because rules can be defined according given
media
Pages are easier to maintain and update
Web Development Company Indiahttp://www.ifourtechnolab.com
Thank you
Software development company indiahttp://www.ifourtechnolab.com

Contenu connexe

Tendances

4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1Jyoti Yadav
 
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
 
2 introduction css
2 introduction css2 introduction css
2 introduction cssJalpesh Vasa
 
Css Founder.com | Cssfounder in
Css Founder.com | Cssfounder inCss Founder.com | Cssfounder in
Css Founder.com | Cssfounder inCss Founder
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSAmit Tyagi
 
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
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSLarry King
 
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
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete NotesEPAM Systems
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshMukesh Kumar
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sassSean Wolfe
 
Css3 Complete Reference
Css3 Complete ReferenceCss3 Complete Reference
Css3 Complete ReferenceEPAM Systems
 

Tendances (19)

4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
 
Css
CssCss
Css
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
 
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)
 
2 introduction css
2 introduction css2 introduction css
2 introduction css
 
Css Founder.com | Cssfounder in
Css Founder.com | Cssfounder inCss Founder.com | Cssfounder in
Css Founder.com | Cssfounder in
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
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
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Intro to HTML + CSS
Intro to HTML + CSSIntro to HTML + CSS
Intro to HTML + CSS
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sass
 
Css3 Complete Reference
Css3 Complete ReferenceCss3 Complete Reference
Css3 Complete Reference
 

En vedette (11)

对话本站
对话本站对话本站
对话本站
 
Infopack - Success Through Compliance Seminar
Infopack - Success Through Compliance SeminarInfopack - Success Through Compliance Seminar
Infopack - Success Through Compliance Seminar
 
Eileen resume2017A
Eileen resume2017AEileen resume2017A
Eileen resume2017A
 
Blue Group
Blue GroupBlue Group
Blue Group
 
Calculus2
Calculus2Calculus2
Calculus2
 
Jeu vidéo et apprentissage
Jeu vidéo et apprentissageJeu vidéo et apprentissage
Jeu vidéo et apprentissage
 
Relacionamento interpessoal e equipes de trabalho
Relacionamento interpessoal e equipes de trabalhoRelacionamento interpessoal e equipes de trabalho
Relacionamento interpessoal e equipes de trabalho
 
La descolonització
La descolonitzacióLa descolonització
La descolonització
 
Resort
ResortResort
Resort
 
Unitat 4. la ciutat medieval
Unitat 4. la ciutat medievalUnitat 4. la ciutat medieval
Unitat 4. la ciutat medieval
 
Facts about rat
Facts about ratFacts about rat
Facts about rat
 

Similaire à Understanding CSS for web development by software outsourcing company india

Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSSNosheen Qamar
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmithaps4
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1Heather Rock
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.pptssuser568d77
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting LabSwapnali Pawar
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptxMattMarino13
 
Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Thinkful
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptxMattMarino13
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflowPeter Kaizer
 

Similaire à Understanding CSS for web development by software outsourcing company india (20)

Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
css v1 guru
css v1 gurucss v1 guru
css v1 guru
 
Basic css
Basic cssBasic css
Basic css
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
 
CSS
CSSCSS
CSS
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
 
Artdm171 Week5 Css
Artdm171 Week5 CssArtdm171 Week5 Css
Artdm171 Week5 Css
 
Css
CssCss
Css
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
 
Basic css-tutorial
Basic css-tutorialBasic css-tutorial
Basic css-tutorial
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)
 
CSS Introduction
CSS Introduction CSS Introduction
CSS Introduction
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
Css
CssCss
Css
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 

Dernier

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
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
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
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
 

Dernier (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
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
 

Understanding CSS for web development by software outsourcing company india

  • 2. Cascading Style Sheets (CSS)  Cascading Style Sheets (CSS) • Used to describe the presentation of documents • Define sizes, spacing, fonts, colors, layout, etc. • Improve content accessibility and flexibility  Designed to separate presentation from content.  CSS style sheets are the modern way to control the appearance and layout of your web pages.  4.0 and up Navigator and IE fully support CSS.  They are used to control how elements are presented in the Web page  Work with the common visual browsers (Internet Explorer, Firefox, Opera)  Used properly, can great simplify visual design, site management and content maintenance Web Development Company Indiahttp://www.ifourtechnolab.com
  • 3. Style Sheets Syntax Style sheets consist of rules, selectors, declarations, properties and values Selectors are separated by commas Declarations are separated by semicolons Properties and values are separated by colons h1,h2,h3 { color: green; font-weight: bold; } Web Development Company Indiahttp://www.ifourtechnolab.com
  • 4. Selectors Selectors determine which element the rule applies to: • All elements of specific type (tag) • Those that mach a specific attribute (id, class) • Elements may be matched depending on how they are nested in the document tree (HTML)  Examples: .header a { color: green } #menu>li { padding-top: 8px } Web Development Company Indiahttp://www.ifourtechnolab.com
  • 5. Selectors  Three primary kinds of selectors: • By tag (type selector): • By element id: • By element class name (only for HTML):  Selectors can be combined with commas: This will match <h1> tags, elements with class link, and element with id top-link h1 { font-family: verdana,sans-serif; } #element_id { color: #ff0000; } .myClass {border: 1px solid red} h1, .link, #top-link {font-weight: bold} Web Development Company Indiahttp://www.ifourtechnolab.com
  • 6. Selectors Pseudo-classes define state • :hover, :visited, :active , :lang  Pseudo-elements define element "parts" or are used to generate content • :first-line , :before, :after a:hover { color: red; } p:first-line { text-transform: uppercase; } .title:before { content: "»"; } .title:after { content: "«"; } Web Development Company Indiahttp://www.ifourtechnolab.com
  • 7. Selectors Match relative to element placement: This will match all <a> tags that are inside of <p> * – universal selector (avoid or use with care!): This will match all descendants of <p> element + selector – used to match “next sibling”: This will match all siblings with class name link that appear immediately after <img> tag p a {text-decoration: underline} p * {color: black} img + .link {float:right} Web Development Company Indiahttp://www.ifourtechnolab.com
  • 8. Selectors > selector – matches direct child nodes: This will match all elements with class error, direct children of <p> tag [ ] – matches tag attributes by regular expression: This will match all <img> tags with alt attribute containing the word logo .class1.class2 (no space) - matches elements with both (all) classes applied at the same time p > .error {font-size: 8px} img[alt~=logo] {border: none} Web Development Company Indiahttp://www.ifourtechnolab.com
  • 9. Values in the CSS Rules Colors are set in RGB format (decimal or hex): • Example: #a0a6aa = rgb(160, 166, 170) • Predefined color aliases exist: black, blue, etc. Numeric values are specified in: • Pixels, ems, e.g. 12px , 1.4em • Points, inches, centimeters, millimeters • E.g. 10pt , 1in, 1cm, 1mm • Percentages, e.g. 50% • Percentage of what?... • Zero can be used with no unit: border: 0; Web Development Company Indiahttp://www.ifourtechnolab.com
  • 10. Linking HTML and CSS HTML (content) and CSS (presentation) can be linked in three ways: • Inline: the CSS rules in the style attribute • No selectors are needed • Embedded: in the <head> in a <style> tag • External: CSS rules in separate file (best) • Usually a file with .css extension • Linked via <link rel="stylesheet" href=…> tag or @import directive in embedded CSS block Web Development Company Indiahttp://www.ifourtechnolab.com
  • 11. Linking HTML and CSS Using external files is highly recommended • Simplifies the HTML document • Improves page load speed as the CSS file is cached Web Development Company Indiahttp://www.ifourtechnolab.com
  • 12. Inline Styles: Example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Inline Styles</title> </head> <body> <p>Here is some text</p> <!--Separate multiple styles with a semicolon--> <p style="font-size: 20pt">Here is some more text</p> <p style="font-size: 20pt;color: #0000FF" >Even more text</p> </body> </html> inline-styles.html Web Development Company Indiahttp://www.ifourtechnolab.com
  • 13. External CSS Styles External linking • Separate pages can all use a shared style sheet • Only modify a single file to change the styles across your entire Web site (see http://www.csszengarden.com/) link tag (with a rel attribute) • Specifies a relationship between current document and another document • link elements should be in the <head> <link rel="stylesheet" type="text/css" href="styles.css"> Web Development Company Indiahttp://www.ifourtechnolab.com
  • 14. External CSS Styles: Example /* CSS Document */ a { text-decoration: none } a:hover { text-decoration: underline; color: red; background-color: #CCFFCC } li em { color: red; font-weight: bold } ul { margin-left: 2cm } ul ul { text-decoration: underline; margin-left: .5cm } styles.css Web Development Company Indiahttp://www.ifourtechnolab.com
  • 15. Text-related CSS Properties color – specifies the color of the text font-size – size of font: xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger or numeric value font-family – comma separated font names • Example: verdana, sans-serif, etc. • The browser loads the first one that is available • There should always be at least one generic font font-weight can be normal, bold, bolder, lighter or a number in range [100 … 900] Web Development Company Indiahttp://www.ifourtechnolab.com
  • 16. CSS Rules for Fonts font-style – styles the font • Values: normal, italic, oblique text-decoration – decorates the text • Values: none, underline, line-trough, overline, blink text-align – defines the alignment of text or other content • Values: left, right, center, justify Web Development Company Indiahttp://www.ifourtechnolab.com
  • 17. Backgrounds background-image • URL of image to be used as background, e.g.: background-color • Using color and image and the same time background-repeat • repeat-x, repeat-y, repeat, no-repeat background-attachment • fixed / scroll background-image:url("back.gif"); Web Development Company Indiahttp://www.ifourtechnolab.com
  • 18. Borders border-width: thin, medium, thick or numerical value (e.g. 10px) border-color: color alias or RGB value border-style: none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset Each property can be defined separately for left, top, bottom and right • border-top-style, border-left-color, … Web Development Company Indiahttp://www.ifourtechnolab.com
  • 19. Width and Height width – defines numerical value for the width of element, e.g. 200px height – defines numerical value for the height of element, e.g. 100px • By default the height of an element is defined by its content • Inline elements do not apply height, unless you change their display style. Web Development Company Indiahttp://www.ifourtechnolab.com
  • 20. Margin and Padding margin and padding define the spacing around the element • Numerical value, e.g. 10px or -5px • Can be defined for each of the four sides separately - margin-top, padding-left, … • margin is the spacing outside of the border • padding is the spacing between the border and the content • What are collapsing margins? Web Development Company Indiahttp://www.ifourtechnolab.com
  • 21. Float float: the element “floats” to one side • left: places the element on the left and following content on the right • right: places the element on the right and following content on the left • floated elements should come before the content that will wrap around them in the code • margins of floated elements do not collapse • floated inline elements can apply height Web Development Company Indiahttp://www.ifourtechnolab.com
  • 22. Benefits of using CSS More powerful formatting than using presentation tags Your pages load faster, because browsers cache the .css files Increased accessibility, because rules can be defined according given media Pages are easier to maintain and update Web Development Company Indiahttp://www.ifourtechnolab.com
  • 23. Thank you Software development company indiahttp://www.ifourtechnolab.com

Notes de l'éditeur

  1. Web Development Company India - http://www.ifourtechnolab.com/
  2. Web Development Company India - http://www.ifourtechnolab.com/
  3. Web Development Company India - http://www.ifourtechnolab.com/
  4. Web Development Company India - http://www.ifourtechnolab.com/
  5. Web Development Company India - http://www.ifourtechnolab.com/
  6. Web Development Company India - http://www.ifourtechnolab.com/
  7. Web Development Company India - http://www.ifourtechnolab.com/
  8. Web Development Company India - http://www.ifourtechnolab.com/
  9. Web Development Company India - http://www.ifourtechnolab.com/
  10. Web Development Company India - http://www.ifourtechnolab.com/
  11. Web Development Company India - http://www.ifourtechnolab.com/
  12. Web Development Company India - http://www.ifourtechnolab.com/
  13. Web Development Company India - http://www.ifourtechnolab.com/
  14. Web Development Company India - http://www.ifourtechnolab.com/
  15. Web Development Company India - http://www.ifourtechnolab.com/
  16. Web Development Company India - http://www.ifourtechnolab.com/
  17. Web Development Company India - http://www.ifourtechnolab.com/
  18. Web Development Company India - http://www.ifourtechnolab.com/
  19. Web Development Company India - http://www.ifourtechnolab.com/
  20. Web Development Company India - http://www.ifourtechnolab.com/
  21. Web Development Company India - http://www.ifourtechnolab.com/
  22. Software Outsourcing Company India - http://www.ifourtechnolab.com/