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

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 syntaxpriyadharshini murugan
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style SheetsMarc Steel
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Chris Poteet
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)Harshita Yadav
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)AakankshaR
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpcasestudyhelp
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheetvijayta
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSAmeer Khan
 
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
 
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)Ardee Aram
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSAmit Tyagi
 

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

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 developmenthayat123
 
Music magazines annotation
Music magazines annotationMusic magazines annotation
Music magazines annotationLukeBrazierMedia
 
Photoshoot
PhotoshootPhotoshoot
Photoshoothayat123
 
Media magazine annotation
Media magazine annotationMedia magazine annotation
Media magazine annotationvanessawanner
 
Magazine cover analysis main coursework
Magazine cover analysis   main courseworkMagazine cover analysis   main coursework
Magazine cover analysis main courseworksarah123ashcroft
 
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...Heather Hutchinson
 

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

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 yearPerry 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 sPerry Mallari
 
Second lesson for first year
Second lesson for first yearSecond lesson for first year
Second lesson for first yearPerry Mallari
 
Part two second year
Part two second yearPart two second year
Part two second yearPerry 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 testPerry Mallari
 
Part two second year
Part two second yearPart two second year
Part two second yearPerry 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 quarterPerry 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 soundPerry 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 MakingPerry 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 PresentationPerry 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 SoundsPerry 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 StylePerry 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

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
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
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
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 

Recently uploaded (20)

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...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
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
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 

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>