SlideShare a Scribd company logo
1 of 15
The Three Types of Style
Sheet
Inline, Internal (Embedded), and External Style Sheet
Inline Style Sheet
▪ This is placed inside the tag itself

▪ They are declared with the ”style =“ attribute.
▪ Example:
<p style = “color:red”> This text will be color red. </p>
Internal Style Sheet
▪ Is used if you want your HTML to have a unique style

▪ Is define using the <style> tag and goes in the head
section of the HTML document
▪ The <style> tag specifies the content type of a style
sheet with its type attribute which should be set to
“text/css”
<style type=“text/css”>
Styles go here
</style>
Internal Style Sheet
▪ Example:
<html>
<head>
<style type=“text/css”>
p {color:maroon}
</style>
</head>
<body>
<p>this text is color maroon</p>
<p>and this one too</p>
</body>
</html>
Internal Style Sheet
▪ This style sheets specifies that the text in all
instances of the <p> tag in the <body> section will be
colored maroon.
External Style Sheet
▪ Used to apply one or more styles to many pages.

▪ If you make any changes with the external style
sheet, the change is applied to all the pages where
the style sheet is used
▪ Declared in a separate file with a .css extension
▪ Called by pages whose interface it will affect
▪ They are called with the used of <link> tag that is
place in the head section of an HTML document
External Style Sheet
▪ The <link> tag should be written like this:
– <link rel=“stylesheet” type=text/css” href=“test.css” />

▪ Wherein the tag above has three attributes
respectively as follows:
▪ rel- when using an external style sheet on a
webpage, this attribute takes the value “stylesheet.”
▪ Type - when using an external style sheet on a web
page, this attribute takes the value “text/css”
▪ href – indicates the name and location of the external
style sheet to be used.
More on CSS
CSS (Cascading Style Sheet)
Multiple Style Sheet

▪ You can use multiple style sheets in one
page
▪ You can apply an inline style sheet and
an internal style sheet at the same time
or an external and internal style sheet
simultaneously
▪ But consider what should have the
highest priority from the two
Style sheet by priority
▪ Inline Style Sheet
– It has the highest priority
– It will override styles declared in an internal
style sheet, an external style sheet, and a web
browser’s default style

▪ Internal Style Sheet
– An Internal style sheet has the second has the
second highest priority
– It will override styles declared in an external
style sheet and a web browsers default style
Style sheet by priority

▪ External Style Sheet
– Has the third highest priority
– It will override web browsers default
style

▪ Browsers Default Style
– Has the lowest priority
– It is used when there is no style set for an
element in an inline, internal, or external
style sheet
Creating id’s and classes
▪ The Class Selector
– It is used to specify a style for a group of elements
– Allows you to set a particular style for many HTML elements
with the same class
Creating id’s and classes
<html>

<head>
<style>

The class selector is
defined starting with
“.” followed by its
name

.center{text-align:center;}
</style>

</head>
<body>
<h1 class = “center”> This heading is aligned center.</h1>
</body>
</html>
Creating id’s and classes
▪ The id Selector
– Specify style for a single and unique element
– Its defined with # sign before its name
– Can be written in an external and internal style sheet
Creating id’s and classes
<html>

<head>
<style>
#center{text-align:center;}
</style>
</head>
<body>
<h1 id = “center”> This heading is aligned center.</h1>
</body>
</html>

More Related Content

What's hot

Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Marc Steel
 

What's hot (19)

Introduction to css & its attributes with syntax
Introduction to css & its attributes with syntaxIntroduction to css & its attributes with syntax
Introduction to css & its attributes with syntax
 
chitra
chitrachitra
chitra
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
What is CSS?
What is CSS?What is CSS?
What is CSS?
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
Css
CssCss
Css
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
Css
CssCss
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)
 
Css
CssCss
Css
 
An Introduction to Cascading Style Sheets (CSS3)
An Introduction to Cascading Style Sheets (CSS3)An Introduction to Cascading Style Sheets (CSS3)
An Introduction to Cascading Style Sheets (CSS3)
 
Lecture2
Lecture2Lecture2
Lecture2
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 

Viewers also liked (6)

Rock Music Magazine Final Front Cover development
Rock Music Magazine Final Front Cover developmentRock Music Magazine Final Front Cover development
Rock Music Magazine Final Front Cover development
 
Music magazines annotation
Music magazines annotationMusic magazines annotation
Music magazines annotation
 
Photoshoot
PhotoshootPhotoshoot
Photoshoot
 
Media magazine annotation
Media magazine annotationMedia magazine annotation
Media magazine annotation
 
Magazine cover analysis main coursework
Magazine cover analysis   main courseworkMagazine cover analysis   main coursework
Magazine cover analysis main coursework
 
Media magazine cover, contents, double page spread analysis- complete, addi...
Media  magazine cover, contents, double page spread analysis-  complete, addi...Media  magazine cover, contents, double page spread analysis-  complete, addi...
Media magazine cover, contents, double page spread analysis- complete, addi...
 

Similar to The three types of style sheet lesson two fourth quarter fourth year

Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
Sónia
 
ch04-css-basics_final.ppt
ch04-css-basics_final.pptch04-css-basics_final.ppt
ch04-css-basics_final.ppt
GmachImen
 
Css introduction
Css introductionCss introduction
Css introduction
Sridhar P
 

Similar to The three types of style sheet lesson two fourth quarter fourth year (20)

BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptx
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Basic HTML/CSS
Basic HTML/CSSBasic HTML/CSS
Basic HTML/CSS
 
Css how to insert css
Css how to insert cssCss how to insert css
Css how to insert css
 
HTML STYLES
HTML STYLESHTML STYLES
HTML STYLES
 
Html styles
Html stylesHtml styles
Html styles
 
Turorial css
Turorial cssTurorial css
Turorial css
 
ch04-css-basics_final.ppt
ch04-css-basics_final.pptch04-css-basics_final.ppt
ch04-css-basics_final.ppt
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
CSS Basics (Cascading Style Sheet)
CSS Basics (Cascading Style Sheet)CSS Basics (Cascading Style Sheet)
CSS Basics (Cascading Style Sheet)
 
Css introduction
Css introductionCss introduction
Css introduction
 
Css inclusion
Css   inclusionCss   inclusion
Css inclusion
 
Css Basics
Css BasicsCss Basics
Css Basics
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 

More from Perry Mallari

Film making fourth quarter lesson 2 third year
Film making  fourth quarter lesson 2 third yearFilm making  fourth quarter lesson 2 third year
Film making fourth quarter lesson 2 third year
Perry Mallari
 
Lesson 3 second year fourth quarter s
Lesson 3 second year fourth quarter sLesson 3 second year fourth quarter s
Lesson 3 second year fourth quarter s
Perry Mallari
 
Second lesson for first year
Second lesson for first yearSecond lesson for first year
Second lesson for first year
Perry Mallari
 
Part two second year
Part two second yearPart two second year
Part two second year
Perry Mallari
 
Pointers for all year level 4th monthly test
Pointers for all year level 4th monthly testPointers for all year level 4th monthly test
Pointers for all year level 4th monthly test
Perry Mallari
 
Part two second year
Part two second yearPart two second year
Part two second year
Perry Mallari
 
Sources for audio lesson two second year fourt quarter
Sources for audio lesson two second year fourt quarterSources for audio lesson two second year fourt quarter
Sources for audio lesson two second year fourt quarter
Perry Mallari
 
Second year Lesson Two sources of sound
Second year Lesson Two sources of soundSecond year Lesson Two sources of sound
Second year Lesson Two sources of sound
Perry Mallari
 
Lesson One Fourth QuarterThird Year High School Film Making
Lesson One Fourth QuarterThird Year High School Film MakingLesson One Fourth QuarterThird Year High School Film Making
Lesson One Fourth QuarterThird Year High School Film Making
Perry Mallari
 
Lesson One Fourth Quarter First Year High School Running A Presentation
Lesson One Fourth Quarter First Year High School Running A PresentationLesson One Fourth Quarter First Year High School Running A Presentation
Lesson One Fourth Quarter First Year High School Running A Presentation
Perry Mallari
 
Lesson One Fourth Quarter Second Year High School Understanding Sounds
Lesson One Fourth Quarter Second Year High School Understanding SoundsLesson One Fourth Quarter Second Year High School Understanding Sounds
Lesson One Fourth Quarter Second Year High School Understanding Sounds
Perry Mallari
 
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
Perry Mallari
 

More from Perry Mallari (14)

Film making fourth quarter lesson 2 third year
Film making  fourth quarter lesson 2 third yearFilm making  fourth quarter lesson 2 third year
Film making fourth quarter lesson 2 third year
 
Lesson 3 second year fourth quarter s
Lesson 3 second year fourth quarter sLesson 3 second year fourth quarter s
Lesson 3 second year fourth quarter s
 
Second lesson for first year
Second lesson for first yearSecond lesson for first year
Second lesson for first year
 
Slide Design
Slide DesignSlide Design
Slide Design
 
Part two second year
Part two second yearPart two second year
Part two second year
 
Pointers for all year level 4th monthly test
Pointers for all year level 4th monthly testPointers for all year level 4th monthly test
Pointers for all year level 4th monthly test
 
Part two second year
Part two second yearPart two second year
Part two second year
 
Q and a god father
Q and a god fatherQ and a god father
Q and a god father
 
Sources for audio lesson two second year fourt quarter
Sources for audio lesson two second year fourt quarterSources for audio lesson two second year fourt quarter
Sources for audio lesson two second year fourt quarter
 
Second year Lesson Two sources of sound
Second year Lesson Two sources of soundSecond year Lesson Two sources of sound
Second year Lesson Two sources of sound
 
Lesson One Fourth QuarterThird Year High School Film Making
Lesson One Fourth QuarterThird Year High School Film MakingLesson One Fourth QuarterThird Year High School Film Making
Lesson One Fourth QuarterThird Year High School Film Making
 
Lesson One Fourth Quarter First Year High School Running A Presentation
Lesson One Fourth Quarter First Year High School Running A PresentationLesson One Fourth Quarter First Year High School Running A Presentation
Lesson One Fourth Quarter First Year High School Running A Presentation
 
Lesson One Fourth Quarter Second Year High School Understanding Sounds
Lesson One Fourth Quarter Second Year High School Understanding SoundsLesson One Fourth Quarter Second Year High School Understanding Sounds
Lesson One Fourth Quarter Second Year High School Understanding Sounds
 
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
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

The three types of style sheet lesson two fourth quarter fourth year

  • 1. The Three Types of Style Sheet Inline, Internal (Embedded), and External Style Sheet
  • 2. Inline Style Sheet ▪ This is placed inside the tag itself ▪ They are declared with the ”style =“ attribute. ▪ Example: <p style = “color:red”> This text will be color red. </p>
  • 3. Internal Style Sheet ▪ Is used if you want your HTML to have a unique style ▪ Is define using the <style> tag and goes in the head section of the HTML document ▪ The <style> tag specifies the content type of a style sheet with its type attribute which should be set to “text/css” <style type=“text/css”> Styles go here </style>
  • 4. Internal Style Sheet ▪ Example: <html> <head> <style type=“text/css”> p {color:maroon} </style> </head> <body> <p>this text is color maroon</p> <p>and this one too</p> </body> </html>
  • 5. Internal Style Sheet ▪ This style sheets specifies that the text in all instances of the <p> tag in the <body> section will be colored maroon.
  • 6. External Style Sheet ▪ Used to apply one or more styles to many pages. ▪ If you make any changes with the external style sheet, the change is applied to all the pages where the style sheet is used ▪ Declared in a separate file with a .css extension ▪ Called by pages whose interface it will affect ▪ They are called with the used of <link> tag that is place in the head section of an HTML document
  • 7. External Style Sheet ▪ The <link> tag should be written like this: – <link rel=“stylesheet” type=text/css” href=“test.css” /> ▪ Wherein the tag above has three attributes respectively as follows: ▪ rel- when using an external style sheet on a webpage, this attribute takes the value “stylesheet.” ▪ Type - when using an external style sheet on a web page, this attribute takes the value “text/css” ▪ href – indicates the name and location of the external style sheet to be used.
  • 8. More on CSS CSS (Cascading Style Sheet)
  • 9. Multiple Style Sheet ▪ You can use multiple style sheets in one page ▪ You can apply an inline style sheet and an internal style sheet at the same time or an external and internal style sheet simultaneously ▪ But consider what should have the highest priority from the two
  • 10. Style sheet by priority ▪ Inline Style Sheet – It has the highest priority – It will override styles declared in an internal style sheet, an external style sheet, and a web browser’s default style ▪ Internal Style Sheet – An Internal style sheet has the second has the second highest priority – It will override styles declared in an external style sheet and a web browsers default style
  • 11. Style sheet by priority ▪ External Style Sheet – Has the third highest priority – It will override web browsers default style ▪ Browsers Default Style – Has the lowest priority – It is used when there is no style set for an element in an inline, internal, or external style sheet
  • 12. Creating id’s and classes ▪ The Class Selector – It is used to specify a style for a group of elements – Allows you to set a particular style for many HTML elements with the same class
  • 13. Creating id’s and classes <html> <head> <style> The class selector is defined starting with “.” followed by its name .center{text-align:center;} </style> </head> <body> <h1 class = “center”> This heading is aligned center.</h1> </body> </html>
  • 14. Creating id’s and classes ▪ The id Selector – Specify style for a single and unique element – Its defined with # sign before its name – Can be written in an external and internal style sheet
  • 15. Creating id’s and classes <html> <head> <style> #center{text-align:center;} </style> </head> <body> <h1 id = “center”> This heading is aligned center.</h1> </body> </html>