SlideShare a Scribd company logo
1 of 12
CSS - INCLUSION
CSS โ€“ INCLUSION :
There are four ways to associate styles with your HTML document. Most commonly used methods are inline
CSS and External CSS.
Embedded CSS - The <style> Element :
You can put your CSS rules into an HTML document using the <style> element. This tag is placed inside the
<head>...</head> tags. Rules defined using this syntax will be applied to all the elements available in the
document. Here is the generic syntax โ€“
<!DOCTYPE html>
<html>
<head>
<style type = "text/css" media = "all">
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
It will produce the following result โˆ’
This is a heading
This is a paragraph.
Attributes :
Attributes associated with <style> elements are โˆ’
Attribute Value Description
type text/css Specifies the style sheet language as a content-type
(MIME type). This is required attribute.
media screen
tty tv projection
handheld
print braille aural
all
Specifies the device the document will be displayed on.
Default value is all.This is an optional attribute.
Inline CSS - The style Attribute :
You can use style attribute of any HTML element to define style rules. These rules will be
applied to that element only. Here is the generic syntax โˆ’
<element style = "...style rules....">
Attributes :
Attribute Value Description
style style rules The value of The value of style attribute is a combination of style
declarations separated by semicolon (;).
Example
Following is the example of inline CSS based on the above syntax :
<html>
<head>
</head>
<body>
<h1 style = "color:#36C;">
This is inline CSS
</h1>
</body>
</html>
External CSS - The <link> Element
๏ถ The <link> element can be used to include an external stylesheet file in your
HTML document.
๏ถ An external style sheet is a separate text file with .css extension. You define all
the Style rules within this text file and then you can include this file in any HTML
document using <link> element.
๏ถ Here is the generic syntax of including external CSS file โˆ’
<head>
<link type = "text/css" href = "..." media = "..." />
</head>
Attributes
Attributes associated with <style> elements are
Example
Consider a simple style sheet file with a name mystyle.css having the following rules โˆ’
h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
Now you can include this file mystyle.css in any HTML
document as follows โˆ’
<head>
<link type = "text/css" href = "mystyle.css" media = " all" />
</head>
Imported CSS - @import Rule
@import is used to import an external stylesheet in a manner similar to the <link>
element. Here is the generic syntax of @import rule.
<head>
@import "URL";
</head>
Here URL is the URL of the style sheet file having style
rules. You can use another syntax as well โˆ’
<head>
@import url("URL");
</head>
CSS Rules Overriding
We have discussed four ways to include style sheet rules in a an HTML document. Here is
the rule to override any Style Sheet Rule.
๏ถ Any inline style sheet takes highest priority. So, it will override any rule defined in
<style>...</style> tags or rules defined in any external style sheet file.
๏ถ Any rule defined in <style>...</style> tags will override rules defined in any external
style sheet file.
๏ถ Any rule defined in external style sheet file takes lowest priority, and rules defined in
this file will be applied only when above two rules are not applicable.
CSS Comments
Many times, you may need to put additional comments in your style sheet blocks. So, it is
very easy to comment any part in style sheet. You can simple put your comments inside
/*.....this is a comment in style sheet.....*/.
You can use /* ....*/ to comment multi-line blocks in similar way you do in C and C++
programming languages
Example
<!DOCTYPE html>
<html>
<head>
<style>
p {
color: red;
/*This is a single-line comment */
text-align: center;
}
/*This is a multi-line comment */
</style>
</head>
<body>
<p>HelloWorld!</p>
</body>
</html>
It will produce the following result โˆ’

More Related Content

What's hot

Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1Jesus Obenita Jr.
ย 
Session 2 intro to Css
Session 2 intro to CssSession 2 intro to Css
Session 2 intro to CssMuhammad Hesham
ย 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to HtmlJoni
ย 
INFO3775 Chapter 2 Part 2
INFO3775 Chapter 2 Part 2INFO3775 Chapter 2 Part 2
INFO3775 Chapter 2 Part 2Jeff Byrnes
ย 
Css few small tips and information
Css few small tips and informationCss few small tips and information
Css few small tips and informationNaga Harish M
ย 
CSS- Cascading Style Sheet
CSS- Cascading Style SheetCSS- Cascading Style Sheet
CSS- Cascading Style SheetCodewizacademy
ย 
Artdm171 Week4 Tags
Artdm171 Week4 TagsArtdm171 Week4 Tags
Artdm171 Week4 TagsGilbert Guerrero
ย 
HTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageHTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageCodewizacademy
ย 
Coding a Website with HTML
Coding a Website with HTMLCoding a Website with HTML
Coding a Website with HTMLwrhsbusiness
ย 
Css Founder.com | Cssfounder se
Css Founder.com | Cssfounder seCss Founder.com | Cssfounder se
Css Founder.com | Cssfounder seCss Founder
ย 
CSS3 Introduction
CSS3 IntroductionCSS3 Introduction
CSS3 IntroductionJaeni Sahuri
ย 
Boostrap basics
Boostrap basicsBoostrap basics
Boostrap basicsJTechTown
ย 
Html - By Auroskkil
Html - By AuroskkilHtml - By Auroskkil
Html - By AuroskkilBoneyGawande
ย 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!Ana Cidre
ย 
Html and css
Html and cssHtml and css
Html and cssSamiksha Pun
ย 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skillsBoneyGawande
ย 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSSRandy Oest II
ย 

What's hot (20)

Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1
ย 
Session 2 intro to Css
Session 2 intro to CssSession 2 intro to Css
Session 2 intro to Css
ย 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
ย 
INFO3775 Chapter 2 Part 2
INFO3775 Chapter 2 Part 2INFO3775 Chapter 2 Part 2
INFO3775 Chapter 2 Part 2
ย 
Css few small tips and information
Css few small tips and informationCss few small tips and information
Css few small tips and information
ย 
CSS- Cascading Style Sheet
CSS- Cascading Style SheetCSS- Cascading Style Sheet
CSS- Cascading Style Sheet
ย 
Artdm171 Week4 Tags
Artdm171 Week4 TagsArtdm171 Week4 Tags
Artdm171 Week4 Tags
ย 
HTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageHTML- Hyper Text Markup Language
HTML- Hyper Text Markup Language
ย 
Coding a Website with HTML
Coding a Website with HTMLCoding a Website with HTML
Coding a Website with HTML
ย 
HTML and CSS
HTML and CSSHTML and CSS
HTML and CSS
ย 
Css Founder.com | Cssfounder se
Css Founder.com | Cssfounder seCss Founder.com | Cssfounder se
Css Founder.com | Cssfounder se
ย 
Turorial css
Turorial cssTurorial css
Turorial css
ย 
CSS3 Introduction
CSS3 IntroductionCSS3 Introduction
CSS3 Introduction
ย 
Boostrap basics
Boostrap basicsBoostrap basics
Boostrap basics
ย 
Html - By Auroskkil
Html - By AuroskkilHtml - By Auroskkil
Html - By Auroskkil
ย 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
ย 
Html and css
Html and cssHtml and css
Html and css
ย 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
ย 
Html css
Html cssHtml css
Html css
ย 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
ย 

Similar to CSS - INCLUSION METHODS

Introduction to css
Introduction to cssIntroduction to css
Introduction to cssJoseph Gabriel
ย 
Css introduction
Css introductionCss introduction
Css introductionSridhar P
ย 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style SheetsMukesh Tekwani
ย 
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and StyleLesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and StylePerry Mallari
ย 
Unit III CSS & JAVA Script.pdf
Unit III CSS & JAVA Script.pdfUnit III CSS & JAVA Script.pdf
Unit III CSS & JAVA Script.pdfmeghana092
ย 
CSS Training in Bangalore
CSS Training in BangaloreCSS Training in Bangalore
CSS Training in Bangalorerajkamal560066
ย 
CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)Harshit Srivastava
ย 
Css introduction
Css  introductionCss  introduction
Css introductionvishnu murthy
ย 
Css tutorial
Css tutorialCss tutorial
Css tutorialvedaste
ย 
Welcome to css!
Welcome to css!Welcome to css!
Welcome to css!sidneyodingo
ย 
ch04-css-basics_final.ppt
ch04-css-basics_final.pptch04-css-basics_final.ppt
ch04-css-basics_final.pptGmachImen
ย 
Css starting
Css startingCss starting
Css startingRahul Dihora
ย 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS NotesTushar Rajput
ย 
Introduction HTML and CSS
Introduction HTML and CSSIntroduction HTML and CSS
Introduction HTML and CSSGovtITIWomen
ย 
Introducing the style tag 2830
Introducing the style tag  2830Introducing the style tag  2830
Introducing the style tag 2830mdjstudios
ย 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSSispkosova
ย 

Similar to CSS - INCLUSION METHODS (20)

Introduction to css
Introduction to cssIntroduction to css
Introduction to css
ย 
Css introduction
Css introductionCss introduction
Css introduction
ย 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
ย 
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and StyleLesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
ย 
Unit III CSS & JAVA Script.pdf
Unit III CSS & JAVA Script.pdfUnit III CSS & JAVA Script.pdf
Unit III CSS & JAVA Script.pdf
ย 
CSS Training in Bangalore
CSS Training in BangaloreCSS Training in Bangalore
CSS Training in Bangalore
ย 
CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)
ย 
Css
CssCss
Css
ย 
Css introduction
Css  introductionCss  introduction
Css introduction
ย 
Css tutorial
Css tutorialCss tutorial
Css tutorial
ย 
Welcome to css!
Welcome to css!Welcome to css!
Welcome to css!
ย 
CSS in HTML
CSS in HTMLCSS in HTML
CSS in HTML
ย 
ch04-css-basics_final.ppt
ch04-css-basics_final.pptch04-css-basics_final.ppt
ch04-css-basics_final.ppt
ย 
Css starting
Css startingCss starting
Css starting
ย 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
ย 
Web technology Unit-II Part-C
Web technology Unit-II Part-CWeb technology Unit-II Part-C
Web technology Unit-II Part-C
ย 
Introduction HTML and CSS
Introduction HTML and CSSIntroduction HTML and CSS
Introduction HTML and CSS
ย 
Introducing the style tag 2830
Introducing the style tag  2830Introducing the style tag  2830
Introducing the style tag 2830
ย 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
ย 
Css
CssCss
Css
ย 

More from AbhishekMondal42

Oss evaluation-certification-oss-financial-advantages
Oss evaluation-certification-oss-financial-advantagesOss evaluation-certification-oss-financial-advantages
Oss evaluation-certification-oss-financial-advantagesAbhishekMondal42
ย 
Word press posts(preview &amp; publish)
Word press posts(preview &amp; publish)Word press posts(preview &amp; publish)
Word press posts(preview &amp; publish)AbhishekMondal42
ย 
Word press posts(add , edit , delete post)
Word press posts(add , edit , delete post)Word press posts(add , edit , delete post)
Word press posts(add , edit , delete post)AbhishekMondal42
ย 
Word press pages(edit and delete)
Word press pages(edit and delete)Word press pages(edit and delete)
Word press pages(edit and delete)AbhishekMondal42
ย 
Word press pages(add)
Word press pages(add)Word press pages(add)
Word press pages(add)AbhishekMondal42
ย 
Word press media(add,insert,delete)
Word press media(add,insert,delete)Word press media(add,insert,delete)
Word press media(add,insert,delete)AbhishekMondal42
ย 
Word press media library
Word press media libraryWord press media library
Word press media libraryAbhishekMondal42
ย 
Word press widget management
Word press  widget managementWord press  widget management
Word press widget managementAbhishekMondal42
ย 
Word press view plugins
Word press  view pluginsWord press  view plugins
Word press view pluginsAbhishekMondal42
ย 
Word press user roles
Word press  user rolesWord press  user roles
Word press user rolesAbhishekMondal42
ย 
Word press theme management
Word press  theme managementWord press  theme management
Word press theme managementAbhishekMondal42
ย 
Word press personal profile
Word press  personal profileWord press  personal profile
Word press personal profileAbhishekMondal42
ย 
Word press moderate comments
Word press  moderate commentsWord press  moderate comments
Word press moderate commentsAbhishekMondal42
ย 
Word press install plugins
Word press  install pluginsWord press  install plugins
Word press install pluginsAbhishekMondal42
ย 
Word press edit users
Word press  edit usersWord press  edit users
Word press edit usersAbhishekMondal42
ย 
Word press edit tags
Word press  edit tagsWord press  edit tags
Word press edit tagsAbhishekMondal42
ย 
Word press edit links
Word press  edit linksWord press  edit links
Word press edit linksAbhishekMondal42
ย 
Word press edit comments
Word press  edit commentsWord press  edit comments
Word press edit commentsAbhishekMondal42
ย 
Word press delete users
Word press  delete usersWord press  delete users
Word press delete usersAbhishekMondal42
ย 

More from AbhishekMondal42 (20)

Oss evaluation-certification-oss-financial-advantages
Oss evaluation-certification-oss-financial-advantagesOss evaluation-certification-oss-financial-advantages
Oss evaluation-certification-oss-financial-advantages
ย 
Word press 01
Word press 01Word press 01
Word press 01
ย 
Word press posts(preview &amp; publish)
Word press posts(preview &amp; publish)Word press posts(preview &amp; publish)
Word press posts(preview &amp; publish)
ย 
Word press posts(add , edit , delete post)
Word press posts(add , edit , delete post)Word press posts(add , edit , delete post)
Word press posts(add , edit , delete post)
ย 
Word press pages(edit and delete)
Word press pages(edit and delete)Word press pages(edit and delete)
Word press pages(edit and delete)
ย 
Word press pages(add)
Word press pages(add)Word press pages(add)
Word press pages(add)
ย 
Word press media(add,insert,delete)
Word press media(add,insert,delete)Word press media(add,insert,delete)
Word press media(add,insert,delete)
ย 
Word press media library
Word press media libraryWord press media library
Word press media library
ย 
Word press widget management
Word press  widget managementWord press  widget management
Word press widget management
ย 
Word press view plugins
Word press  view pluginsWord press  view plugins
Word press view plugins
ย 
Word press user roles
Word press  user rolesWord press  user roles
Word press user roles
ย 
Word press theme management
Word press  theme managementWord press  theme management
Word press theme management
ย 
Word press personal profile
Word press  personal profileWord press  personal profile
Word press personal profile
ย 
Word press moderate comments
Word press  moderate commentsWord press  moderate comments
Word press moderate comments
ย 
Word press install plugins
Word press  install pluginsWord press  install plugins
Word press install plugins
ย 
Word press edit users
Word press  edit usersWord press  edit users
Word press edit users
ย 
Word press edit tags
Word press  edit tagsWord press  edit tags
Word press edit tags
ย 
Word press edit links
Word press  edit linksWord press  edit links
Word press edit links
ย 
Word press edit comments
Word press  edit commentsWord press  edit comments
Word press edit comments
ย 
Word press delete users
Word press  delete usersWord press  delete users
Word press delete users
ย 

Recently uploaded

call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
ย 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
ย 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
ย 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
ย 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
ย 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
ย 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
ย 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...Dr. Mazin Mohamed alkathiri
ย 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
ย 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
ย 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
ย 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
ย 
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
ย 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
ย 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
ย 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
ย 

Recently uploaded (20)

call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Kamla Market (DELHI) ๐Ÿ” >เผ’9953330565๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
ย 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
ย 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
ย 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
ย 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
ย 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
ย 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
ย 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
ย 
Model Call Girl in Bikash Puri Delhi reach out to us at ๐Ÿ”9953056974๐Ÿ”
Model Call Girl in Bikash Puri  Delhi reach out to us at ๐Ÿ”9953056974๐Ÿ”Model Call Girl in Bikash Puri  Delhi reach out to us at ๐Ÿ”9953056974๐Ÿ”
Model Call Girl in Bikash Puri Delhi reach out to us at ๐Ÿ”9953056974๐Ÿ”
ย 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
ย 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
ย 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ย 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
ย 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
ย 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
ย 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
ย 
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
โ€œOh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
ย 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
ย 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
ย 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
ย 

CSS - INCLUSION METHODS

  • 2. CSS โ€“ INCLUSION : There are four ways to associate styles with your HTML document. Most commonly used methods are inline CSS and External CSS. Embedded CSS - The <style> Element : You can put your CSS rules into an HTML document using the <style> element. This tag is placed inside the <head>...</head> tags. Rules defined using this syntax will be applied to all the elements available in the document. Here is the generic syntax โ€“ <!DOCTYPE html> <html> <head> <style type = "text/css" media = "all"> body { background-color: linen; } h1 { color: maroon; margin-left: 40px; } </style> </head>
  • 3. <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> It will produce the following result โˆ’ This is a heading This is a paragraph.
  • 4. Attributes : Attributes associated with <style> elements are โˆ’ Attribute Value Description type text/css Specifies the style sheet language as a content-type (MIME type). This is required attribute. media screen tty tv projection handheld print braille aural all Specifies the device the document will be displayed on. Default value is all.This is an optional attribute.
  • 5. Inline CSS - The style Attribute : You can use style attribute of any HTML element to define style rules. These rules will be applied to that element only. Here is the generic syntax โˆ’ <element style = "...style rules...."> Attributes : Attribute Value Description style style rules The value of The value of style attribute is a combination of style declarations separated by semicolon (;).
  • 6. Example Following is the example of inline CSS based on the above syntax : <html> <head> </head> <body> <h1 style = "color:#36C;"> This is inline CSS </h1> </body> </html>
  • 7. External CSS - The <link> Element ๏ถ The <link> element can be used to include an external stylesheet file in your HTML document. ๏ถ An external style sheet is a separate text file with .css extension. You define all the Style rules within this text file and then you can include this file in any HTML document using <link> element. ๏ถ Here is the generic syntax of including external CSS file โˆ’ <head> <link type = "text/css" href = "..." media = "..." /> </head>
  • 9. Example Consider a simple style sheet file with a name mystyle.css having the following rules โˆ’ h1, h2, h3 { color: #36C; font-weight: normal; letter-spacing: .4em; margin-bottom: 1em; text-transform: lowercase; } Now you can include this file mystyle.css in any HTML document as follows โˆ’ <head> <link type = "text/css" href = "mystyle.css" media = " all" /> </head>
  • 10. Imported CSS - @import Rule @import is used to import an external stylesheet in a manner similar to the <link> element. Here is the generic syntax of @import rule. <head> @import "URL"; </head> Here URL is the URL of the style sheet file having style rules. You can use another syntax as well โˆ’ <head> @import url("URL"); </head>
  • 11. CSS Rules Overriding We have discussed four ways to include style sheet rules in a an HTML document. Here is the rule to override any Style Sheet Rule. ๏ถ Any inline style sheet takes highest priority. So, it will override any rule defined in <style>...</style> tags or rules defined in any external style sheet file. ๏ถ Any rule defined in <style>...</style> tags will override rules defined in any external style sheet file. ๏ถ Any rule defined in external style sheet file takes lowest priority, and rules defined in this file will be applied only when above two rules are not applicable. CSS Comments Many times, you may need to put additional comments in your style sheet blocks. So, it is very easy to comment any part in style sheet. You can simple put your comments inside /*.....this is a comment in style sheet.....*/. You can use /* ....*/ to comment multi-line blocks in similar way you do in C and C++ programming languages
  • 12. Example <!DOCTYPE html> <html> <head> <style> p { color: red; /*This is a single-line comment */ text-align: center; } /*This is a multi-line comment */ </style> </head> <body> <p>HelloWorld!</p> </body> </html> It will produce the following result โˆ’