SlideShare a Scribd company logo
4
Most read
7
Most read
9
Most read
css types internal, external and
inline
Definition of CSS
• CSS stands for Cascading Style Sheets and provides HTML with layout and design. Along with
making things pretty and aesthetically pleasing, CSS also provides a general structure to HTML.
• Some of the most important CSS properties (in my opinion) are (in no order):
• Color - specifying text color.
• Font-family - specifying font type.
• Font-size - specifying font size.
• Text-decoration - specifying text decorations, such as underline.
• Font-style - specifying font styling, such as italics.
• Font-weight - specifying font weight, such as bold.
• Width - specifying the width of an element.
• Height - specifying the height of an element.
• Background - specifying the background.
• Border - specifying a border.
• Text-shadow - specifying a shadow for our text.
• Float - specifying the float of an element, such as left or right.
• Position - specifying the position of an element, such as absolute or relative.
• Position - specifying the position of an element, such as absolute or relative.
• Padding - specifying padding inside an element, such as padding around text.
• Margin - specifying the margin between elements.
• To add CSS styles to your website, you can use
three different ways to insert the CSS. You can
Use an "External Stylesheet", an "Internal
Stylesheet", or "Inline Style".
Internal Stylesheet
• An internal stylesheet holds the CSS code for
the webpage in the head section of the
particular file. This makes it easy to apply
styles like classes or id's in order to reuse the
code. The downside of using an internal
stylesheet is that changes to the internal
stylesheet only effect the page the code is
inserted into.
Internal CSS Stylesheet
• When creating a stylesheet internally in the web page,
you will need to use the <style></style> HTML tags in
the Head section of your webpage. All the code for the
Internal CSS stylesheet is contained between
the <head></head> section of your websites code.
Below is an example of what an Internal stylesheet
looks like.
• <head>
<style type="text/css"> h1 {color:blue;} h2 {color:red;}
p {color:green;} </style>
</head>
• When we add CSS to HTML either; externally
or in the head section, we can use selectors.
• CSS can use HTML elements as selectors, such
as the paragraph, anchor, em and strong tags.
External Stylesheet
• The style sheet file must be saved with a .css
extension.
• The External Stylesheet is a .css file that you
link your website to. This makes it so that
what ever you change in the .css sheet, will
effect every page in your website. This
prevents you from having to make many code
changes in each page. This is for "global" site
changes.
External CSS Stylesheet
• With an external style sheet, you can change the look
of an entire website by changing just one file!
• Each page must include a reference to the external
style sheet file inside the <link> element. The <link>
element goes inside the head section:
• <head> <link rel="stylesheet" type="text/css"
href="mystyle.css"> </head>
• Below is what the code looks like.
• <head>
<link rel="stylesheet" type="text/css"
href="/support/style.css" />
</head>
Inline Styles
• To use inline styles, add the style attribute to the
relevant tag.
• The Inline style is specific to the tag itself. The
inline style uses the HTML "style" attribute to
style a specific tag. This is not recommended, as
every CSS change has to be made in every tag
that has the inline style applied to it. The Inline
style is good for one an individual CSS change
that you do not use repeatedly through the site.
Inline CSS Styles
• The Inline style is specific to the tag itself. The inline
style uses the HTML "style" attribute to style a specific
tag. This is not recommended, as every CSS change has
to be made in every tag that has the inline style applied
to it. The Inline style is good for one an individual CSS
change that you do not use repeatedly through the
site.
• The inline style uses the HTML "style" attribute. This
allows CSS properties on a "per tag" basis. The
following is an example of how the inline style is used.
• <p style="color:red;font-size:18px">This is a
paragraph!</p>
Id in html
• Now that we have started to semantically divide our content, it is
time to introduce yet another set of attributes/values. Up until
now, we haven’t been working with the look of your page, but later
on you will want to be able to change the look of your webpage and
this is where the id’s and classes attributes comes in handy.
• This attribute assigns a name to your element. The name must be
unique and cannot be used anywhere else in your document.
• I said that id-elements would have to be unique and this means you
cannot have two with the same value in you markup – the following
example would not render correctly in the browser:
• <div id="menu">This would be your menu</div>
<div id="blog-entry">Your first blog-entry</div>
<div id="blog-entry">Your second blog-entry</div>
class in html
• that you can have several elements in your document with the
same class-name.
• <div class="blog-entry">
<p> Just Another Day<br />
Written by Christina<br />
On January 11th </p>
<p class="content">This is my second blog entry, and I just
wanted to check in on you </p>
</div>
<div class="blog-entry">
<p> My First Blog Entry<br />
Written by Christina<br />
On January 10th </p>
<p class="content">I’m so happy to write my first blog entry –
yay!</p>
<div>
• The title Attribute
• Here, a title attribute is added to
the <p> element. The value of the title
attribute will be displayed as a tooltip when
you mouse over the paragraph:
• Example
• <p title="I'm a tooltip">
This is a paragraph.
</p>
• http://www.inmotionhosting.com/support/ed
u/website-design/using-css/linking-your-css-
to-your-website
• http://www.html5-tutorials.org/html-
basics/id-and-class/
• http://ryanfait.com/articles/the-difference-
between-ids-and-classes/
• http://www.w3schools.com/html/html_attrib
utes.asp

More Related Content

What's hot (20)

PPT
HTML Tags
Pranay Agrawal
 
PPTX
Event In JavaScript
ShahDhruv21
 
PPT
CSS Basics
WordPress Memphis
 
PPTX
HTML Forms
Ravinder Kamboj
 
PDF
Html frames
eShikshak
 
PPTX
Css selectors
Parth Trivedi
 
PPT
Introduction to CSS
Amit Tyagi
 
PPT
Span and Div tags in HTML
Biswadip Goswami
 
PPTX
Html ppt
santosh lamba
 
PPTX
html-table
Dhirendra Chauhan
 
PPTX
HTML Text formatting tags
Himanshu Pathak
 
PDF
Xml schema
Prabhakaran V M
 
PPTX
Complete Lecture on Css presentation
Salman Memon
 
PPT
Html Ppt
vijayanit
 
PPTX
Html coding
Briana VanBuskirk
 
PDF
Html / CSS Presentation
Shawn Calvert
 
PPTX
1 03 - CSS Introduction
apnwebdev
 
PDF
Introduction to HTML5
Gil Fink
 
HTML Tags
Pranay Agrawal
 
Event In JavaScript
ShahDhruv21
 
CSS Basics
WordPress Memphis
 
HTML Forms
Ravinder Kamboj
 
Html frames
eShikshak
 
Css selectors
Parth Trivedi
 
Introduction to CSS
Amit Tyagi
 
Span and Div tags in HTML
Biswadip Goswami
 
Html ppt
santosh lamba
 
html-table
Dhirendra Chauhan
 
HTML Text formatting tags
Himanshu Pathak
 
Xml schema
Prabhakaran V M
 
Complete Lecture on Css presentation
Salman Memon
 
Html Ppt
vijayanit
 
Html coding
Briana VanBuskirk
 
Html / CSS Presentation
Shawn Calvert
 
1 03 - CSS Introduction
apnwebdev
 
Introduction to HTML5
Gil Fink
 

Viewers also liked (20)

PPTX
Html and css
Sukrit Gupta
 
PPTX
Digital games
chrissy112488
 
PPTX
Animal Tissues PowerPoint Presentation
Mohak Jain
 
PPTX
Chapter 16 Legal Controls and Freedom of Expression
Lindsey Conlin Maxwell
 
PDF
Digital communication in video game industry
Mathieu Desgurse
 
PDF
The future of media queries?
yiibu
 
PDF
Book of Lesson Scripts (English)
Novus Business and IT Training Program
 
PPTX
Adobe Photoshop Tools
MyLa De La Peña
 
PPTX
Chapter 3 Digital Gaming and the Media Playground
Lindsey Conlin Maxwell
 
PPT
How to get an a as media studies
cigdemkalem
 
PDF
Photoshop
cigdemkalem
 
PPTX
Microsoft Excel Basics
Jennifer Belmonte-Mejia
 
PPTX
Intro to Excel Basics: Part I
Si Krishan
 
PPTX
Excel Lesson 1: Excel Basics
Novus Business and IT Training Program
 
PPT
Badminton Bilingüe
Alberto García
 
PPT
CSS for Beginners
Amit Kumar Singh
 
PPTX
Techthrends2013
Reymart Canuel
 
PPTX
Presentation on Adobe Photoshop
Mohak Jain
 
Html and css
Sukrit Gupta
 
Digital games
chrissy112488
 
Animal Tissues PowerPoint Presentation
Mohak Jain
 
Chapter 16 Legal Controls and Freedom of Expression
Lindsey Conlin Maxwell
 
Digital communication in video game industry
Mathieu Desgurse
 
The future of media queries?
yiibu
 
Book of Lesson Scripts (English)
Novus Business and IT Training Program
 
Adobe Photoshop Tools
MyLa De La Peña
 
Chapter 3 Digital Gaming and the Media Playground
Lindsey Conlin Maxwell
 
How to get an a as media studies
cigdemkalem
 
Photoshop
cigdemkalem
 
Microsoft Excel Basics
Jennifer Belmonte-Mejia
 
Intro to Excel Basics: Part I
Si Krishan
 
Excel Lesson 1: Excel Basics
Novus Business and IT Training Program
 
Badminton Bilingüe
Alberto García
 
CSS for Beginners
Amit Kumar Singh
 
Techthrends2013
Reymart Canuel
 
Presentation on Adobe Photoshop
Mohak Jain
 
Ad

Similar to Css types internal, external and inline (1) (20)

PPTX
BITM3730Week4.pptx
MattMarino13
 
PPTX
CSS Basics part One
M Ashraful Islam Jewel
 
PPTX
CSS tutorial chapter 1
jeweltutin
 
PPTX
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
utsavsd11
 
PPTX
BITM3730 9-19.pptx
MattMarino13
 
PPTX
Cascading style sheet an introduction
Himanshu Pathak
 
PPTX
Ifi7174 lesson2
Sónia
 
PPTX
BITM3730 9-20.pptx
MattMarino13
 
PPTX
basic programming language AND HTML CSS JAVApdf
elayelily
 
PPTX
CSS Introduction
Thapar Institute
 
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
PPTX
Unit 2 WT-CSS.pptx web technology project
abhiramhatwar
 
DOC
Css introduction
vishnu murthy
 
PPTX
Cascading style sheets
smithaps4
 
PPTX
Casecading Style Sheets for Hyper Text Transfer Protocol.pptx
usmanahmadawan
 
DOC
Css introduction
Sridhar P
 
PPTX
cascadingstylesheets,introduction.css styles-210909054722.pptx
hannahroseline2
 
PPTX
Web Development - Lecture 5
Syed Shahzaib Sohail
 
PPT
6_CasCadingStylesSheetsCSS.ppt
VARNITBHASKAR1
 
BITM3730Week4.pptx
MattMarino13
 
CSS Basics part One
M Ashraful Islam Jewel
 
CSS tutorial chapter 1
jeweltutin
 
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
utsavsd11
 
BITM3730 9-19.pptx
MattMarino13
 
Cascading style sheet an introduction
Himanshu Pathak
 
Ifi7174 lesson2
Sónia
 
BITM3730 9-20.pptx
MattMarino13
 
basic programming language AND HTML CSS JAVApdf
elayelily
 
CSS Introduction
Thapar Institute
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
Unit 2 WT-CSS.pptx web technology project
abhiramhatwar
 
Css introduction
vishnu murthy
 
Cascading style sheets
smithaps4
 
Casecading Style Sheets for Hyper Text Transfer Protocol.pptx
usmanahmadawan
 
Css introduction
Sridhar P
 
cascadingstylesheets,introduction.css styles-210909054722.pptx
hannahroseline2
 
Web Development - Lecture 5
Syed Shahzaib Sohail
 
6_CasCadingStylesSheetsCSS.ppt
VARNITBHASKAR1
 
Ad

More from Webtech Learning (20)

PPTX
Benefits of Digital Marketing
Webtech Learning
 
PPTX
Digital Marketing Benefits
Webtech Learning
 
PPTX
Future Scope of Digital Marketing in India
Webtech Learning
 
PPTX
Bootstrap webtech presentation - new
Webtech Learning
 
PPTX
Css presentation
Webtech Learning
 
PPTX
Client side &amp; Server side Scripting
Webtech Learning
 
PPTX
Software testing & Quality Assurance
Webtech Learning
 
PPTX
Shadows Effects in CSS
Webtech Learning
 
PPTX
Bs Typography
Webtech Learning
 
PPTX
Bootstrap grids
Webtech Learning
 
PPTX
Html formatting
Webtech Learning
 
PPTX
Css box-sizing
Webtech Learning
 
PPTX
Css position
Webtech Learning
 
PPTX
Css margins
Webtech Learning
 
PPTX
Css box-model
Webtech Learning
 
PPTX
Css Display Property
Webtech Learning
 
PPTX
Html media
Webtech Learning
 
PPTX
Css floats
Webtech Learning
 
PPTX
Html5 semantics
Webtech Learning
 
PPTX
Css pseudo-classes
Webtech Learning
 
Benefits of Digital Marketing
Webtech Learning
 
Digital Marketing Benefits
Webtech Learning
 
Future Scope of Digital Marketing in India
Webtech Learning
 
Bootstrap webtech presentation - new
Webtech Learning
 
Css presentation
Webtech Learning
 
Client side &amp; Server side Scripting
Webtech Learning
 
Software testing & Quality Assurance
Webtech Learning
 
Shadows Effects in CSS
Webtech Learning
 
Bs Typography
Webtech Learning
 
Bootstrap grids
Webtech Learning
 
Html formatting
Webtech Learning
 
Css box-sizing
Webtech Learning
 
Css position
Webtech Learning
 
Css margins
Webtech Learning
 
Css box-model
Webtech Learning
 
Css Display Property
Webtech Learning
 
Html media
Webtech Learning
 
Css floats
Webtech Learning
 
Html5 semantics
Webtech Learning
 
Css pseudo-classes
Webtech Learning
 

Recently uploaded (20)

PPTX
The Costly Mistakes Homeowners Make in Dining Room Renovations
anurag anand
 
PDF
ABS system PPT 2025 for used automatic backing system .pdf
altron1331
 
PDF
Favorite Looks Menswear Spring Summer 2026
Ana Andjelic
 
PPTX
QBDqbdqbdqbdqbdqbdqbdqbdqbdqbqdbqd .pptx
komoja3525
 
PPTX
Turn prompts into brochures - AI Brochure Generator
Venngage AI Infographic Generator
 
PDF
Balance Your Home with These Vastu Tips!
https://homzinterio.in/
 
PPTX
Design_Guidelinescarrr_Presentation.pptx
kikajic949
 
PPTX
assignmesmcnjjanckujeckusent2-summit1.pptx
DoanHoaiAnhDuongK18C
 
PPTX
BOILER STEAM bana M ntpc kahalgaon boiler .pptx
didikesaadi1108
 
PPTX
4. PMES PORTFOLIO_BROWN DESIGN_T1-T3_A4.pptx
GynnelNicanor1
 
PPTX
Project Report on Corrosion (1).pptxkkkk
kaushikpkrishna2024
 
PDF
inbound6040378307114221962.pdf.dowload...
kayesetinasan
 
PPTX
Presentationghjgghjhg (11)hcpckxgjt.pptx
ishafarikarbel
 
PPTX
FINAL.......... april 02-2025 april.pptx
MAACJudymaeM
 
PDF
Graphic Designing Article All about Graphic Designing
Techera
 
PPTX
Power BI - The future of Data Presentation and Visualizations
Techera
 
PPTX
PTC '25.pptx VXFGHDZDGDRYRIYUUOIUOPIO'KL
JorrehtyMRegondola
 
PPTX
Robotic Arm Control System for help of robots you can easily operate things t...
altron1331
 
PPTX
etab modelling and design of concrete elemnts
MohamedAttia601252
 
PDF
The Third Place revolution: Designing for community in a fragmented world
jgadsbypeet8321
 
The Costly Mistakes Homeowners Make in Dining Room Renovations
anurag anand
 
ABS system PPT 2025 for used automatic backing system .pdf
altron1331
 
Favorite Looks Menswear Spring Summer 2026
Ana Andjelic
 
QBDqbdqbdqbdqbdqbdqbdqbdqbdqbqdbqd .pptx
komoja3525
 
Turn prompts into brochures - AI Brochure Generator
Venngage AI Infographic Generator
 
Balance Your Home with These Vastu Tips!
https://homzinterio.in/
 
Design_Guidelinescarrr_Presentation.pptx
kikajic949
 
assignmesmcnjjanckujeckusent2-summit1.pptx
DoanHoaiAnhDuongK18C
 
BOILER STEAM bana M ntpc kahalgaon boiler .pptx
didikesaadi1108
 
4. PMES PORTFOLIO_BROWN DESIGN_T1-T3_A4.pptx
GynnelNicanor1
 
Project Report on Corrosion (1).pptxkkkk
kaushikpkrishna2024
 
inbound6040378307114221962.pdf.dowload...
kayesetinasan
 
Presentationghjgghjhg (11)hcpckxgjt.pptx
ishafarikarbel
 
FINAL.......... april 02-2025 april.pptx
MAACJudymaeM
 
Graphic Designing Article All about Graphic Designing
Techera
 
Power BI - The future of Data Presentation and Visualizations
Techera
 
PTC '25.pptx VXFGHDZDGDRYRIYUUOIUOPIO'KL
JorrehtyMRegondola
 
Robotic Arm Control System for help of robots you can easily operate things t...
altron1331
 
etab modelling and design of concrete elemnts
MohamedAttia601252
 
The Third Place revolution: Designing for community in a fragmented world
jgadsbypeet8321
 

Css types internal, external and inline (1)

  • 1. css types internal, external and inline
  • 2. Definition of CSS • CSS stands for Cascading Style Sheets and provides HTML with layout and design. Along with making things pretty and aesthetically pleasing, CSS also provides a general structure to HTML. • Some of the most important CSS properties (in my opinion) are (in no order): • Color - specifying text color. • Font-family - specifying font type. • Font-size - specifying font size. • Text-decoration - specifying text decorations, such as underline. • Font-style - specifying font styling, such as italics. • Font-weight - specifying font weight, such as bold. • Width - specifying the width of an element. • Height - specifying the height of an element. • Background - specifying the background. • Border - specifying a border. • Text-shadow - specifying a shadow for our text. • Float - specifying the float of an element, such as left or right. • Position - specifying the position of an element, such as absolute or relative. • Position - specifying the position of an element, such as absolute or relative. • Padding - specifying padding inside an element, such as padding around text. • Margin - specifying the margin between elements.
  • 3. • To add CSS styles to your website, you can use three different ways to insert the CSS. You can Use an "External Stylesheet", an "Internal Stylesheet", or "Inline Style".
  • 4. Internal Stylesheet • An internal stylesheet holds the CSS code for the webpage in the head section of the particular file. This makes it easy to apply styles like classes or id's in order to reuse the code. The downside of using an internal stylesheet is that changes to the internal stylesheet only effect the page the code is inserted into.
  • 5. Internal CSS Stylesheet • When creating a stylesheet internally in the web page, you will need to use the <style></style> HTML tags in the Head section of your webpage. All the code for the Internal CSS stylesheet is contained between the <head></head> section of your websites code. Below is an example of what an Internal stylesheet looks like. • <head> <style type="text/css"> h1 {color:blue;} h2 {color:red;} p {color:green;} </style> </head>
  • 6. • When we add CSS to HTML either; externally or in the head section, we can use selectors. • CSS can use HTML elements as selectors, such as the paragraph, anchor, em and strong tags.
  • 7. External Stylesheet • The style sheet file must be saved with a .css extension. • The External Stylesheet is a .css file that you link your website to. This makes it so that what ever you change in the .css sheet, will effect every page in your website. This prevents you from having to make many code changes in each page. This is for "global" site changes.
  • 8. External CSS Stylesheet • With an external style sheet, you can change the look of an entire website by changing just one file! • Each page must include a reference to the external style sheet file inside the <link> element. The <link> element goes inside the head section: • <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> • Below is what the code looks like. • <head> <link rel="stylesheet" type="text/css" href="/support/style.css" /> </head>
  • 9. Inline Styles • To use inline styles, add the style attribute to the relevant tag. • The Inline style is specific to the tag itself. The inline style uses the HTML "style" attribute to style a specific tag. This is not recommended, as every CSS change has to be made in every tag that has the inline style applied to it. The Inline style is good for one an individual CSS change that you do not use repeatedly through the site.
  • 10. Inline CSS Styles • The Inline style is specific to the tag itself. The inline style uses the HTML "style" attribute to style a specific tag. This is not recommended, as every CSS change has to be made in every tag that has the inline style applied to it. The Inline style is good for one an individual CSS change that you do not use repeatedly through the site. • The inline style uses the HTML "style" attribute. This allows CSS properties on a "per tag" basis. The following is an example of how the inline style is used. • <p style="color:red;font-size:18px">This is a paragraph!</p>
  • 11. Id in html • Now that we have started to semantically divide our content, it is time to introduce yet another set of attributes/values. Up until now, we haven’t been working with the look of your page, but later on you will want to be able to change the look of your webpage and this is where the id’s and classes attributes comes in handy. • This attribute assigns a name to your element. The name must be unique and cannot be used anywhere else in your document. • I said that id-elements would have to be unique and this means you cannot have two with the same value in you markup – the following example would not render correctly in the browser: • <div id="menu">This would be your menu</div> <div id="blog-entry">Your first blog-entry</div> <div id="blog-entry">Your second blog-entry</div>
  • 12. class in html • that you can have several elements in your document with the same class-name. • <div class="blog-entry"> <p> Just Another Day<br /> Written by Christina<br /> On January 11th </p> <p class="content">This is my second blog entry, and I just wanted to check in on you </p> </div> <div class="blog-entry"> <p> My First Blog Entry<br /> Written by Christina<br /> On January 10th </p> <p class="content">I’m so happy to write my first blog entry – yay!</p> <div>
  • 13. • The title Attribute • Here, a title attribute is added to the <p> element. The value of the title attribute will be displayed as a tooltip when you mouse over the paragraph: • Example • <p title="I'm a tooltip"> This is a paragraph. </p>
  • 14. • http://www.inmotionhosting.com/support/ed u/website-design/using-css/linking-your-css- to-your-website • http://www.html5-tutorials.org/html- basics/id-and-class/ • http://ryanfait.com/articles/the-difference- between-ids-and-classes/ • http://www.w3schools.com/html/html_attrib utes.asp