SlideShare a Scribd company logo
2
Most read
8
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

PPT
How Cascading Style Sheets (CSS) Works
PPTX
Cascading style sheet
PPTX
PDF
HTML and CSS crash course!
PPTX
Cascading style sheets (CSS)
PPT
cascading style sheet ppt
PPSX
Introduction to Html5
PPTX
(Fast) Introduction to HTML & CSS
How Cascading Style Sheets (CSS) Works
Cascading style sheet
HTML and CSS crash course!
Cascading style sheets (CSS)
cascading style sheet ppt
Introduction to Html5
(Fast) Introduction to HTML & CSS

What's hot (20)

PPT
Introduction to Cascading Style Sheets (CSS)
PPTX
Css position
PPTX
html-table
PPT
CSS Basics
PPT
Scripting languages
PPT
Introduction to html
PPTX
Cascading Style Sheet (CSS)
PPTX
HTML: Tables and Forms
PPSX
Javascript variables and datatypes
PDF
Html / CSS Presentation
PPTX
css.ppt
PPTX
HTML Marquee
PPTX
What is CSS?
PDF
PPT
Web Development using HTML & CSS
PPTX
Css Text Formatting
PPT
Introduction to JavaScript
PPT
Css Ppt
PPT
PPT
Introduction to JavaScript (1).ppt
Introduction to Cascading Style Sheets (CSS)
Css position
html-table
CSS Basics
Scripting languages
Introduction to html
Cascading Style Sheet (CSS)
HTML: Tables and Forms
Javascript variables and datatypes
Html / CSS Presentation
css.ppt
HTML Marquee
What is CSS?
Web Development using HTML & CSS
Css Text Formatting
Introduction to JavaScript
Css Ppt
Introduction to JavaScript (1).ppt
Ad

Viewers also liked (20)

PPTX
Html and css
PPTX
Digital games
PPTX
Animal Tissues PowerPoint Presentation
PPTX
Chapter 16 Legal Controls and Freedom of Expression
PDF
Digital communication in video game industry
PDF
The future of media queries?
PDF
Book of Lesson Scripts (English)
PPTX
Adobe Photoshop Tools
PPTX
Chapter 3 Digital Gaming and the Media Playground
PPT
How to get an a as media studies
PDF
Photoshop
PPTX
Microsoft Excel Basics
PPTX
Intro to Excel Basics: Part I
PPTX
Excel Lesson 1: Excel Basics
PPT
Badminton Bilingüe
PPT
CSS for Beginners
PPTX
Techthrends2013
PPTX
Presentation on Adobe Photoshop
Html and css
Digital games
Animal Tissues PowerPoint Presentation
Chapter 16 Legal Controls and Freedom of Expression
Digital communication in video game industry
The future of media queries?
Book of Lesson Scripts (English)
Adobe Photoshop Tools
Chapter 3 Digital Gaming and the Media Playground
How to get an a as media studies
Photoshop
Microsoft Excel Basics
Intro to Excel Basics: Part I
Excel Lesson 1: Excel Basics
Badminton Bilingüe
CSS for Beginners
Techthrends2013
Presentation on Adobe Photoshop
Ad

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

PPT
Unit 2-CSS & Bootstrap.ppt
DOC
Css introduction
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
PDF
TUTORIAL DE CSS 2.0
PPTX
PDF
Css tutorial
PPT
CSS Training in Bangalore
PPTX
BITM3730 9-20.pptx
PPTX
Cascading Styling Sheets(CSS) simple design language intended to transform th...
PDF
Introduction to CSS3
PPTX
CSS ppt of cascading Style sheet for beginners.pptx
PPTX
BITM3730 9-19.pptx
PPTX
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
PPTX
Ifi7174 lesson2
PPTX
v5-introduction to html-css-210321161444.pptx
PPTX
Beginners css tutorial for web designers
PDF
Unit 3 (it workshop).pptx
PPTX
INTRODUCTIONS OF CSS
PPTX
Cascading style sheet, CSS Box model, Table in CSS
Unit 2-CSS & Bootstrap.ppt
Css introduction
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
TUTORIAL DE CSS 2.0
Css tutorial
CSS Training in Bangalore
BITM3730 9-20.pptx
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Introduction to CSS3
CSS ppt of cascading Style sheet for beginners.pptx
BITM3730 9-19.pptx
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
Ifi7174 lesson2
v5-introduction to html-css-210321161444.pptx
Beginners css tutorial for web designers
Unit 3 (it workshop).pptx
INTRODUCTIONS OF CSS
Cascading style sheet, CSS Box model, Table in CSS

More from Webtech Learning (20)

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

Recently uploaded (20)

PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PPTX
DOC-20250430-WA0014._20250714_235747_0000.pptx
PPTX
An introduction to AI in research and reference management
PDF
Quality Control Management for RMG, Level- 4, Certificate
PPTX
Entrepreneur intro, origin, process, method
PPTX
EDP Competencies-types, process, explanation
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PDF
BRANDBOOK-Presidential Award Scheme-Kenya-2023
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPTX
joggers park landscape assignment bandra
PPTX
CLASSIFICATION OF YARN- process, explanation
PPT
UNIT I- Yarn, types, explanation, process
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
PPTX
6- Architecture design complete (1).pptx
PPTX
Special finishes, classification and types, explanation
PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PDF
Interior Structure and Construction A1 NGYANQI
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
DOC-20250430-WA0014._20250714_235747_0000.pptx
An introduction to AI in research and reference management
Quality Control Management for RMG, Level- 4, Certificate
Entrepreneur intro, origin, process, method
EDP Competencies-types, process, explanation
pump pump is a mechanism that is used to transfer a liquid from one place to ...
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
YOW2022-BNE-MinimalViableArchitecture.pdf
BRANDBOOK-Presidential Award Scheme-Kenya-2023
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
joggers park landscape assignment bandra
CLASSIFICATION OF YARN- process, explanation
UNIT I- Yarn, types, explanation, process
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
6- Architecture design complete (1).pptx
Special finishes, classification and types, explanation
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
Interior Structure and Construction A1 NGYANQI

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