HTML Styles
Inline, Internal, External
Objectives:
๏ต Know html styling methods.
๏ต Be able to style websites using inline styling method.
๏ต Be able to style websites using internal styling method.
๏ต Be able to style websites using external styling method.
Agenda:
๏ต Introduction to CSS
๏ต What are the html styling methods?
๏ต Inline styling
๏ต Internal styling
๏ต External styling
What is CSS?
๏ต CSS stands for Cascading Style Sheets.
๏ต CSS describes how HTML elements are to be displayed.
๏ต CSS saves a lot of work. It can control the layout of multiple web pages all at
once.
๏ต External sheets are stored in CSS file.
CSS Syntax:
๏ต A CSS rule consists of a selector and a declaration block.
๏ต The selector pointes to the HTML element you want to style.
๏ต The declaration block contains one or more declarations separated by
semicolons.
๏ต Each declaration includes a CSS property name and a value, separated by a
colon.
๏ต Multiple CSS declarations are separated with semicolons, and declaration
blocks are surrounded by curly brackets.
Html styling methods:
๏ต Inline CSS.
๏ต Internal CSS.
๏ต External CSS.
๏ต Multiple style sheets.
๏ต Cascading order.
Inline style:
๏ต It is the use of style attribute inside html tags:
Exercise: (create the following shapes
using inline styling method)
Internal Styling:
๏ต Using <style> tag inside the <head>
or the <body> tag.
Exercise: (create the following shapes
using internal styling method)

HTML Styles.pptx

  • 1.
  • 2.
    Objectives: ๏ต Know htmlstyling methods. ๏ต Be able to style websites using inline styling method. ๏ต Be able to style websites using internal styling method. ๏ต Be able to style websites using external styling method.
  • 3.
    Agenda: ๏ต Introduction toCSS ๏ต What are the html styling methods? ๏ต Inline styling ๏ต Internal styling ๏ต External styling
  • 4.
    What is CSS? ๏ตCSS stands for Cascading Style Sheets. ๏ต CSS describes how HTML elements are to be displayed. ๏ต CSS saves a lot of work. It can control the layout of multiple web pages all at once. ๏ต External sheets are stored in CSS file.
  • 5.
    CSS Syntax: ๏ต ACSS rule consists of a selector and a declaration block. ๏ต The selector pointes to the HTML element you want to style. ๏ต The declaration block contains one or more declarations separated by semicolons. ๏ต Each declaration includes a CSS property name and a value, separated by a colon. ๏ต Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded by curly brackets.
  • 6.
    Html styling methods: ๏ตInline CSS. ๏ต Internal CSS. ๏ต External CSS. ๏ต Multiple style sheets. ๏ต Cascading order.
  • 7.
    Inline style: ๏ต Itis the use of style attribute inside html tags:
  • 8.
    Exercise: (create thefollowing shapes using inline styling method)
  • 9.
    Internal Styling: ๏ต Using<style> tag inside the <head> or the <body> tag.
  • 10.
    Exercise: (create thefollowing shapes using internal styling method)

Editor's Notes

  • #8ย 1-there are different size measuring units like inch, cm, but px is most commonly used unit and it depends on your screen size. 2-If we style the body tag all the tags inside will inherit the style. 3-80% width will take 80% of your screen width. 4-max-width=500px will fix the width to 500 px max when the size of the screen exceed this size it will stop maximizing to the percentage of the screen size. 5-some styles take one value some take 3 like the border for example.