Recent Posts

What is CSS in HTML? Type of CSS? | infodpsoft

What is CSS in HTML?

    Web development is made up of three elemental files that are the HTML file the CSS file and the JavaScript file. Cascading Style Sheets (CSS) is Describes the HTML Document. CSS Handles the Web Page look and feel.CSS Control HTML Element. CSS making sure how elements look like on a certain web page example their colors the font etc.

html,html5,html tutorial,learn html,html css,html tutorial for beginners,html (programming language),introduction to html,html for beginners,tutorial,html5 tutorial,html 5,xhtml,html 5.1,html div,how to create form in html,link html,html text

There Are 3 Type of CSS

  • Inline CSS
  • Internal CSS
  • External CSS

1) Inline CSS

            Inline CSS is Used to insert style sheets in HTML Element.

        Example  

  1. <html>
  2. <body>
  3.         <p style=color: red”>Hello Infodpsoft</p>
  4. </body>
  5. </html>

    2) Internal CSS 

        Internal CSS is defined in <head> tag of HTML Page.

        Example 

  1. <html>
  2. <head>
  3. <style>
  4. body
  5. {
  6. background-color: red;
  7. }
  8. p
  9. {
  10. color: white;
  11. }
  12. </style>
  13. </head>
  14. <body>
  15. <p>Hello Infodpsoft</p>
  16. </body>
  17. </html>

    3) External CSS 

        External CSS is used External style Sheet. Define CSS link in Head Section of HTML

        <link rel=”stylesheet” type=”text/css” href=”Mycss.css” >

        Example 

  1. <html>
  2. <head>
  3. <link rel=”stylesheet” type=text/css” href=”mystyle.css”>
  4. </head>
  5. <body>
  6. <p>Hello Infodpsoft</p>
  7. </body>
  8. </html>

 Example of CSS Properties.

  • The Color Properties used To Change Text Color.
  • The Font-size Properties used to Change Font-size.
  • The CSS Margin Propertied used to margin outside to Object border.
  • The CSS Padding Properties used to Padding Inside to Object border.
  • The Border Properties used to Border around HTML element.
  • The Text-alignment used to text alignment ex: text left, text right, etc.



No comments:

Powered by Blogger.