SlideShare a Scribd company logo
1 of 20
Tutorials without
tears !
KnowledgeisPOWER!
HTML
CSS
JavaScript
Jquery
SEO
Web
Development
App
Developer
Books
VideoTutorials
Slides
HTML 5 Elements
CSS
Know your
Used to style webpages
Cascading Style Sheets
Can be inserted Internally or Externally
Tells browsers how to display HTML files.
CSS Rules
Know your
A selector: Indicates what element to style
CSS Rules Consist of two main functions
Declaration Block containing other declarations
Each declaration block contains a property
name and value separated by a colon :
The block is then surrounded by a curly bracket
} which marks the end of the block
CSS Rules
Know your
color: blue;H1} font-size: 40px; }
Selector Declaration Declaration
Property PropertyValue Value
the heading text would be blue and font size of 20.
<head>
<title> My First Website </title>
<style>
h1 { color: blue; font-size: 40px;}
</style>
</head>
<body>
<div class=“content”>
<h1>welcome to our website</h1>
</body>
</html>
RUN >> OUTPUT
welcome to our website
External Style Sheet
Know your
Useful for multipage websites that share code
A link to this is placed within the head section
Saves time not inserting code in every page
Improves web page load time
Creates consistent look to all documents
<head>
<title> My First Website </title>
<style>
<link rel="stylesheet" type="text/css" href="mystyle.css">
h1 { color: blue; font-size: 40px;}
</style>
</head>
<body>
<div class=“content”>
<h1>welcome to our website</h1>
</body>
</html>
RUN >> OUTPUT
welcome to our website
External Stylesheet
Hmmmm!!
Know your
The text is too close to the edge..
We can fix this by adding a margin-left property
This moves the text away from the left by ?px
<head>
<title> My First Website </title>
<style>
<link rel="stylesheet" type="text/css" href="mystyle.css">
}
h1 {
color: blue;font-size: 40px; margin-left:50px;
}
</style>
</head>
<body>
<div class=“content”>
<h1>welcome to our website</h1>
</body>
</html>
RUN >> OUTPUT
welcome to our website
H1 Style
Body CSS
Know your
We can add a background colour to the page..
<head>
<title> My First Website </title>
<style>
<link rel="stylesheet" type="text/css" href="mystyle.css">
h1 {
color: blue;font-size: 40px; margin-left:50px;
}
body { background-color:silver;
}
</style>
</head>
<body>
<div class=“content”>
<h1>welcome to our website</h1>
</body>
</html>
RUN >> OUTPUT
Body CSS
welcome to our website
Inline Style
Know your
Used for styling a single element on a page
Applied to specific elements with the <body> tags
All linked pages in an external stylesheet
<head>
<title> My First Website </title>
<style>
<link rel="stylesheet" type="text/css" href="mystyle.css">
h1 {
color: blue;font-size: 40px; margin-left:50px;
}
body { background-color:silver;
}
</style>
</head>
<body>
<div class=“content”>
<h1 style=" color: blue;font-size: 40px; margin-left:50px;
">welcome to our website</h1>
</body>
</html>
RUN >> OUTPUT
Inline Style
welcome to our website
Element ID’s
Know yourThis gives a group of elements their own ID
Can be used to style an individual element
# styles the element with the specified id
Syntax : #id {css declarations;}
}
body { background-color:silver;
}
#intro {
background-color: yellow;
color: black;
font-size: 16px;
font-family: verdana;
}
</style>
</head>
<body>
<div class="content">
<p id="intro">I love learning HTML.</p>
<p id="body">But CSS is even cooler.</p>
</div>
<p>Iam learning how to create a website.</p>
</body>
</html>
RUN >> OUTPUT
CSS #id Selector
welcome to our website
But CSS is even cooler.
Iam learning how to create a website.
I love learning HTML.
Class Selector
Know yourPoints to the HTML element you want to style
Selects elements with a specific class attribute
Can be applied to a range of elements
Symbol (.) followed by the name of the class.
}
body { background-color:silver;
}
.intro {
background-color: blue;
color: white;
font-size: 16px;
font-family: Arial;
}
</style>
</head>
<body>
<div class="content">
<p id="intro">
<p>I love learning HTML.</p>
<p>But CSS is even cooler.</p>
</div>
<p>Iam learning how to create a website.</p>
</body>
</html>
RUN >> OUTPUT
CSS .class Selector
welcome to our website
Iam learning how to create a website.
I love learning HTML.
But CSS is even cooler
Hope to see you soon !
You can follow more
tutorials in the book
https://gumroad.com/products/jyZwR/edit
https://payhip.com/b/CFQu

More Related Content

What's hot

WordCamp Atlanta 2014 - CSS For Beginners - By Michael Earley of ATL Squared ...
WordCamp Atlanta 2014 - CSS For Beginners - By Michael Earley of ATL Squared ...WordCamp Atlanta 2014 - CSS For Beginners - By Michael Earley of ATL Squared ...
WordCamp Atlanta 2014 - CSS For Beginners - By Michael Earley of ATL Squared ...New Tricks
 
Castro Chapter 8
Castro Chapter 8Castro Chapter 8
Castro Chapter 8Jeff Byrnes
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to HtmlJoni
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlantaThinkful
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSTJ Stalcup
 
Coding a Website with HTML
Coding a Website with HTMLCoding a Website with HTML
Coding a Website with HTMLwrhsbusiness
 
CSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorCSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorKelly Kellum
 
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)Thinkful
 
Web Design Course: CSS lecture 5
Web Design Course: CSS  lecture 5Web Design Course: CSS  lecture 5
Web Design Course: CSS lecture 5Gheyath M. Othman
 
Web Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLWeb Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLDer Lo
 
Css with example
Css with exampleCss with example
Css with examplereshmy12
 
Intermediate Web Design
Intermediate Web DesignIntermediate Web Design
Intermediate Web Designmlincol2
 

What's hot (20)

WordCamp Atlanta 2014 - CSS For Beginners - By Michael Earley of ATL Squared ...
WordCamp Atlanta 2014 - CSS For Beginners - By Michael Earley of ATL Squared ...WordCamp Atlanta 2014 - CSS For Beginners - By Michael Earley of ATL Squared ...
WordCamp Atlanta 2014 - CSS For Beginners - By Michael Earley of ATL Squared ...
 
Artdm171 Week5 Css
Artdm171 Week5 CssArtdm171 Week5 Css
Artdm171 Week5 Css
 
Castro Chapter 8
Castro Chapter 8Castro Chapter 8
Castro Chapter 8
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlanta
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
 
Css introduction
Css   introductionCss   introduction
Css introduction
 
Coding a Website with HTML
Coding a Website with HTMLCoding a Website with HTML
Coding a Website with HTML
 
Layout & css lecture
Layout & css lectureLayout & css lecture
Layout & css lecture
 
CSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and ColorCSS Basics - Stylesheets and Color
CSS Basics - Stylesheets and Color
 
Turorial css
Turorial cssTurorial css
Turorial css
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)
 
Web Design Course: CSS lecture 5
Web Design Course: CSS  lecture 5Web Design Course: CSS  lecture 5
Web Design Course: CSS lecture 5
 
CSS3 Introduction
CSS3 IntroductionCSS3 Introduction
CSS3 Introduction
 
CSS
CSSCSS
CSS
 
Web Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLWeb Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTML
 
Css with example
Css with exampleCss with example
Css with example
 
Basic HTML/CSS
Basic HTML/CSSBasic HTML/CSS
Basic HTML/CSS
 
Intermediate Web Design
Intermediate Web DesignIntermediate Web Design
Intermediate Web Design
 

Similar to Tutorials without tears! Learn HTML, CSS, JavaScript and more

Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSSispkosova
 
Intro to CSS_APEC CascadingStyleSheets.pptx
Intro to CSS_APEC CascadingStyleSheets.pptxIntro to CSS_APEC CascadingStyleSheets.pptx
Intro to CSS_APEC CascadingStyleSheets.pptxstephysnscphysio
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Erin M. Kidwell
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.netProgrammer Blog
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web DevelopmentRahul Mishra
 
[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSSBeckhamWee
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptIsmaciil2
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style SheetsSenthil Kumar
 
Css for Development
Css for DevelopmentCss for Development
Css for Developmenttsengsite
 
Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Gheyath M. Othman
 

Similar to Tutorials without tears! Learn HTML, CSS, JavaScript and more (20)

HTML & CSS 2017
HTML & CSS 2017HTML & CSS 2017
HTML & CSS 2017
 
CSS.pdf
CSS.pdfCSS.pdf
CSS.pdf
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
Intro to CSS_APEC CascadingStyleSheets.pptx
Intro to CSS_APEC CascadingStyleSheets.pptxIntro to CSS_APEC CascadingStyleSheets.pptx
Intro to CSS_APEC CascadingStyleSheets.pptx
 
David Weliver
David WeliverDavid Weliver
David Weliver
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
 
[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
css1.ppt
css1.pptcss1.ppt
css1.ppt
 
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
 
Web
WebWeb
Web
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
html-css
html-csshtml-css
html-css
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
 
Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1
 
Html advance
Html advanceHtml advance
Html advance
 

Recently uploaded

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
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
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
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
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 

Recently uploaded (20)

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
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
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
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...
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 

Tutorials without tears! Learn HTML, CSS, JavaScript and more

  • 3. CSS Know your Used to style webpages Cascading Style Sheets Can be inserted Internally or Externally Tells browsers how to display HTML files.
  • 4. CSS Rules Know your A selector: Indicates what element to style CSS Rules Consist of two main functions Declaration Block containing other declarations Each declaration block contains a property name and value separated by a colon : The block is then surrounded by a curly bracket } which marks the end of the block
  • 5. CSS Rules Know your color: blue;H1} font-size: 40px; } Selector Declaration Declaration Property PropertyValue Value the heading text would be blue and font size of 20.
  • 6. <head> <title> My First Website </title> <style> h1 { color: blue; font-size: 40px;} </style> </head> <body> <div class=“content”> <h1>welcome to our website</h1> </body> </html> RUN >> OUTPUT welcome to our website
  • 7. External Style Sheet Know your Useful for multipage websites that share code A link to this is placed within the head section Saves time not inserting code in every page Improves web page load time Creates consistent look to all documents
  • 8. <head> <title> My First Website </title> <style> <link rel="stylesheet" type="text/css" href="mystyle.css"> h1 { color: blue; font-size: 40px;} </style> </head> <body> <div class=“content”> <h1>welcome to our website</h1> </body> </html> RUN >> OUTPUT welcome to our website External Stylesheet
  • 9. Hmmmm!! Know your The text is too close to the edge.. We can fix this by adding a margin-left property This moves the text away from the left by ?px
  • 10. <head> <title> My First Website </title> <style> <link rel="stylesheet" type="text/css" href="mystyle.css"> } h1 { color: blue;font-size: 40px; margin-left:50px; } </style> </head> <body> <div class=“content”> <h1>welcome to our website</h1> </body> </html> RUN >> OUTPUT welcome to our website H1 Style
  • 11. Body CSS Know your We can add a background colour to the page..
  • 12. <head> <title> My First Website </title> <style> <link rel="stylesheet" type="text/css" href="mystyle.css"> h1 { color: blue;font-size: 40px; margin-left:50px; } body { background-color:silver; } </style> </head> <body> <div class=“content”> <h1>welcome to our website</h1> </body> </html> RUN >> OUTPUT Body CSS welcome to our website
  • 13. Inline Style Know your Used for styling a single element on a page Applied to specific elements with the <body> tags All linked pages in an external stylesheet
  • 14. <head> <title> My First Website </title> <style> <link rel="stylesheet" type="text/css" href="mystyle.css"> h1 { color: blue;font-size: 40px; margin-left:50px; } body { background-color:silver; } </style> </head> <body> <div class=“content”> <h1 style=" color: blue;font-size: 40px; margin-left:50px; ">welcome to our website</h1> </body> </html> RUN >> OUTPUT Inline Style welcome to our website
  • 15. Element ID’s Know yourThis gives a group of elements their own ID Can be used to style an individual element # styles the element with the specified id Syntax : #id {css declarations;}
  • 16. } body { background-color:silver; } #intro { background-color: yellow; color: black; font-size: 16px; font-family: verdana; } </style> </head> <body> <div class="content"> <p id="intro">I love learning HTML.</p> <p id="body">But CSS is even cooler.</p> </div> <p>Iam learning how to create a website.</p> </body> </html> RUN >> OUTPUT CSS #id Selector welcome to our website But CSS is even cooler. Iam learning how to create a website. I love learning HTML.
  • 17. Class Selector Know yourPoints to the HTML element you want to style Selects elements with a specific class attribute Can be applied to a range of elements Symbol (.) followed by the name of the class.
  • 18. } body { background-color:silver; } .intro { background-color: blue; color: white; font-size: 16px; font-family: Arial; } </style> </head> <body> <div class="content"> <p id="intro"> <p>I love learning HTML.</p> <p>But CSS is even cooler.</p> </div> <p>Iam learning how to create a website.</p> </body> </html> RUN >> OUTPUT CSS .class Selector welcome to our website Iam learning how to create a website. I love learning HTML. But CSS is even cooler
  • 19. Hope to see you soon !
  • 20. You can follow more tutorials in the book https://gumroad.com/products/jyZwR/edit https://payhip.com/b/CFQu