SlideShare a Scribd company logo
1 of 14
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

What's hot (20)

CSS
CSSCSS
CSS
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Javascript operators
Javascript operatorsJavascript operators
Javascript operators
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
css.ppt
css.pptcss.ppt
css.ppt
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Html
HtmlHtml
Html
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Learn html Basics
Learn html BasicsLearn html Basics
Learn html Basics
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Html frames
Html framesHtml frames
Html frames
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
Javascript
JavascriptJavascript
Javascript
 

Viewers also liked (20)

Html and css
Html and cssHtml and css
Html and css
 
CSS
CSSCSS
CSS
 
Digital games
Digital games Digital games
Digital games
 
Animal Tissues PowerPoint Presentation
Animal Tissues PowerPoint PresentationAnimal Tissues PowerPoint Presentation
Animal Tissues PowerPoint Presentation
 
Robots txt Format Examples
Robots txt Format ExamplesRobots txt Format Examples
Robots txt Format Examples
 
Chapter 16 Legal Controls and Freedom of Expression
Chapter 16  Legal Controls and Freedom of ExpressionChapter 16  Legal Controls and Freedom of Expression
Chapter 16 Legal Controls and Freedom of Expression
 
Digital communication in video game industry
Digital communication in video game industryDigital communication in video game industry
Digital communication in video game industry
 
The future of media queries?
The future of media queries?The future of media queries?
The future of media queries?
 
Book of Lesson Scripts (English)
Book of Lesson Scripts (English)Book of Lesson Scripts (English)
Book of Lesson Scripts (English)
 
Adobe Photoshop Tools
Adobe Photoshop ToolsAdobe Photoshop Tools
Adobe Photoshop Tools
 
Chapter 3 Digital Gaming and the Media Playground
Chapter 3 Digital Gaming and the Media PlaygroundChapter 3 Digital Gaming and the Media Playground
Chapter 3 Digital Gaming and the Media Playground
 
How to get an a as media studies
How to get an a as media studiesHow to get an a as media studies
How to get an a as media studies
 
Photoshop
PhotoshopPhotoshop
Photoshop
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel Basics
 
Intro to Excel Basics: Part I
Intro to Excel Basics: Part IIntro to Excel Basics: Part I
Intro to Excel Basics: Part I
 
Excel Lesson 1: Excel Basics
Excel Lesson 1: Excel BasicsExcel Lesson 1: Excel Basics
Excel Lesson 1: Excel Basics
 
Badminton Bilingüe
Badminton BilingüeBadminton Bilingüe
Badminton Bilingüe
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Techthrends2013
Techthrends2013Techthrends2013
Techthrends2013
 
Presentation on Adobe Photoshop
Presentation on Adobe PhotoshopPresentation on Adobe Photoshop
Presentation on Adobe Photoshop
 

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

BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptxMattMarino13
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1jeweltutin
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptxMattMarino13
 
Cascading style sheet an introduction
Cascading style sheet   an introductionCascading style sheet   an introduction
Cascading style sheet an introductionHimanshu Pathak
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2Sónia
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptxMattMarino13
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfelayelily
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Erin M. Kidwell
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmithaps4
 
Css introduction
Css introductionCss introduction
Css introductionSridhar P
 
6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.pptVARNITBHASKAR1
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
 
CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)PumoTechnovation
 

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

BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptx
 
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.ppt
css.pptcss.ppt
css.ppt
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
Cascading style sheet an introduction
Cascading style sheet   an introductionCascading style sheet   an introduction
Cascading style sheet an introduction
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
CSS Introduction
CSS Introduction CSS Introduction
CSS Introduction
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Css introduction
Css introductionCss introduction
Css introduction
 
Web Development - Lecture 5
Web Development - Lecture 5Web Development - Lecture 5
Web Development - Lecture 5
 
6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt6_CasCadingStylesSheetsCSS.ppt
6_CasCadingStylesSheetsCSS.ppt
 
Css
CssCss
Css
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Basic HTML/CSS
Basic HTML/CSSBasic HTML/CSS
Basic HTML/CSS
 
CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)
 

More from Webtech Learning (20)

Benefits of Digital Marketing
Benefits of Digital MarketingBenefits of Digital Marketing
Benefits of Digital Marketing
 
Digital Marketing Benefits
Digital Marketing  BenefitsDigital Marketing  Benefits
Digital Marketing Benefits
 
Future Scope of Digital Marketing in India
Future Scope of Digital Marketing in IndiaFuture Scope of Digital Marketing in India
Future Scope of Digital Marketing in India
 
Bootstrap webtech presentation - new
Bootstrap   webtech presentation - newBootstrap   webtech presentation - new
Bootstrap webtech presentation - new
 
Css presentation
Css presentationCss presentation
Css presentation
 
Client side &amp; Server side Scripting
Client side &amp; Server side Scripting Client side &amp; Server side Scripting
Client side &amp; Server side Scripting
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance
 
Shadows Effects in CSS
Shadows Effects in CSSShadows Effects in CSS
Shadows Effects in CSS
 
Bs Typography
Bs TypographyBs Typography
Bs Typography
 
Bootstrap grids
Bootstrap gridsBootstrap grids
Bootstrap grids
 
Html formatting
Html formattingHtml formatting
Html formatting
 
Css box-sizing
Css box-sizingCss box-sizing
Css box-sizing
 
Css position
Css positionCss position
Css position
 
Css margins
Css marginsCss margins
Css margins
 
Css box-model
Css box-modelCss box-model
Css box-model
 
Css Display Property
Css Display PropertyCss Display Property
Css Display Property
 
Html media
Html mediaHtml media
Html media
 
Css floats
Css floatsCss floats
Css floats
 
Html5 semantics
Html5 semanticsHtml5 semantics
Html5 semantics
 
Css pseudo-classes
Css pseudo-classesCss pseudo-classes
Css pseudo-classes
 

Recently uploaded

Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Rndexperts
 
Pearl Disrtrict urban analyusis study pptx
Pearl Disrtrict urban analyusis study pptxPearl Disrtrict urban analyusis study pptx
Pearl Disrtrict urban analyusis study pptxDanielTamiru4
 
Niintendo Wii Presentation Template.pptx
Niintendo Wii Presentation Template.pptxNiintendo Wii Presentation Template.pptx
Niintendo Wii Presentation Template.pptxKevinYaelJimnezSanti
 
The spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyThe spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyChristopher Totten
 
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书zdzoqco
 
Iconic Global Solution - web design, Digital Marketing services
Iconic Global Solution - web design, Digital Marketing servicesIconic Global Solution - web design, Digital Marketing services
Iconic Global Solution - web design, Digital Marketing servicesIconic global solution
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfAayushChavan5
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIyuj
 
guest bathroom white and blue ssssssssss
guest bathroom white and blue ssssssssssguest bathroom white and blue ssssssssss
guest bathroom white and blue ssssssssssNadaMohammed714321
 
10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designersPixeldarts
 
Karim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppKarim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppNadaMohammed714321
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...Rishabh Aryan
 
cda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptcda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptMaryamAfzal41
 
10 Best WordPress Plugins to make the website effective in 2024
10 Best WordPress Plugins to make the website effective in 202410 Best WordPress Plugins to make the website effective in 2024
10 Best WordPress Plugins to make the website effective in 2024digital learning point
 
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道yrolcks
 
AI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
AI and Design Vol. 2: Navigating the New Frontier - MorgenboosterAI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
AI and Design Vol. 2: Navigating the New Frontier - Morgenbooster1508 A/S
 
simpson-lee_house_dt20ajshsjsjsjsjj15.pdf
simpson-lee_house_dt20ajshsjsjsjsjj15.pdfsimpson-lee_house_dt20ajshsjsjsjsjj15.pdf
simpson-lee_house_dt20ajshsjsjsjsjj15.pdfLucyBonelli
 
General Knowledge Quiz Game C++ CODE.pptx
General Knowledge Quiz Game C++ CODE.pptxGeneral Knowledge Quiz Game C++ CODE.pptx
General Knowledge Quiz Game C++ CODE.pptxmarckustrevion
 
Giulio Michelon, Founder di @Belka – “Oltre le Stime: Sviluppare una Mentalit...
Giulio Michelon, Founder di @Belka – “Oltre le Stime: Sviluppare una Mentalit...Giulio Michelon, Founder di @Belka – “Oltre le Stime: Sviluppare una Mentalit...
Giulio Michelon, Founder di @Belka – “Oltre le Stime: Sviluppare una Mentalit...Associazione Digital Days
 
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.pptMaking and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.pptJIT KUMAR GUPTA
 

Recently uploaded (20)

Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025
 
Pearl Disrtrict urban analyusis study pptx
Pearl Disrtrict urban analyusis study pptxPearl Disrtrict urban analyusis study pptx
Pearl Disrtrict urban analyusis study pptx
 
Niintendo Wii Presentation Template.pptx
Niintendo Wii Presentation Template.pptxNiintendo Wii Presentation Template.pptx
Niintendo Wii Presentation Template.pptx
 
The spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenologyThe spirit of digital place - game worlds and architectural phenomenology
The spirit of digital place - game worlds and architectural phenomenology
 
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
办理卡尔顿大学毕业证成绩单|购买加拿大文凭证书
 
Iconic Global Solution - web design, Digital Marketing services
Iconic Global Solution - web design, Digital Marketing servicesIconic Global Solution - web design, Digital Marketing services
Iconic Global Solution - web design, Digital Marketing services
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdf
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AI
 
guest bathroom white and blue ssssssssss
guest bathroom white and blue ssssssssssguest bathroom white and blue ssssssssss
guest bathroom white and blue ssssssssss
 
10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers10 must-have Chrome extensions for designers
10 must-have Chrome extensions for designers
 
Karim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 pppppppppppppppKarim apartment ideas 01 ppppppppppppppp
Karim apartment ideas 01 ppppppppppppppp
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
 
cda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptcda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis ppt
 
10 Best WordPress Plugins to make the website effective in 2024
10 Best WordPress Plugins to make the website effective in 202410 Best WordPress Plugins to make the website effective in 2024
10 Best WordPress Plugins to make the website effective in 2024
 
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
怎么办理英国Newcastle毕业证纽卡斯尔大学学位证书一手渠道
 
AI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
AI and Design Vol. 2: Navigating the New Frontier - MorgenboosterAI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
AI and Design Vol. 2: Navigating the New Frontier - Morgenbooster
 
simpson-lee_house_dt20ajshsjsjsjsjj15.pdf
simpson-lee_house_dt20ajshsjsjsjsjj15.pdfsimpson-lee_house_dt20ajshsjsjsjsjj15.pdf
simpson-lee_house_dt20ajshsjsjsjsjj15.pdf
 
General Knowledge Quiz Game C++ CODE.pptx
General Knowledge Quiz Game C++ CODE.pptxGeneral Knowledge Quiz Game C++ CODE.pptx
General Knowledge Quiz Game C++ CODE.pptx
 
Giulio Michelon, Founder di @Belka – “Oltre le Stime: Sviluppare una Mentalit...
Giulio Michelon, Founder di @Belka – “Oltre le Stime: Sviluppare una Mentalit...Giulio Michelon, Founder di @Belka – “Oltre le Stime: Sviluppare una Mentalit...
Giulio Michelon, Founder di @Belka – “Oltre le Stime: Sviluppare una Mentalit...
 
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.pptMaking and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
Making and Unmaking of Chandigarh - A City of Two Plans2-4-24.ppt
 

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