Skip to main content

TYPES OF CSS

We can write a CSS 3 ways in HTML

 ðŸ‘‰Inline CSS:

  • Description: Applied directly within HTML tags using the style attribute.
  • Use Case: Ideal for small-scale styling adjustments on specific elements.
  • Example:
        <p style="color:blue; font-size 16px;"> This is Inline css </p> 


 ðŸ‘‰Internal or Embedded CSS:

  • Description: Placed within the <style> tags in the HTML <head> section.
  • Use Case: Suited for styling a specific webpage; allows for a balance between specificity and reusability.
  • Example:
  • <head>
  • <style>
  • h1{color:green;}
  • p{font-size: 16px;}
  • </style>
  • </head>

 ðŸ‘‰External CSS:

  • Description: Defined in a separate CSS file and linked to HTML using the <link> tag.
  • Use Case: Promotes reusability across multiple pages; facilitates a centralized approach to styling.
  • Example (HTML):
    • <head>
    • <link rel="stylesheet" type="text/css" href="style.css">
    • </head>

Comments

Popular posts from this blog

HTML Basic

 How to Write HTML Tags All HTML document must start with <!DOCTYPE HTML> HTML Document start with <html> and end with </html> (that's call a start tag and end tags. The visible part of the document between <body> and </body> tags. Type of Heading Tags:  HTML document contains a 6 types of heading  we are heading describe with  <h1> heading 1 </h1> tags <h2>  heading 2  </h2>   <h3>  heading 3  </h3>   <h4>  heading 4  </h4>   <h5>  heading 5  </h5>   <h6>  heading 6  </h6> Every heading have a different fonts size. Example: Do practice and Touch with our blog  

HTML BORDER WITH CSS

 Many Type of HTML Border We have many types of border in HTML. We can change it with border style and colors. So we discussed how to change a Border color and Style in HTML. 1.      Firstly we write a Code in Sublime Text and Save it to Borderwithcss file 2.      Secondly we link a stylesheet in  <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>change border style</title> <link rel="stylesheet" type="text/css" href="d:/html blog/style.css"> </head> <body> <p class="b1"> this is a normal paragraph for change border style with css</p> <p class="b2"> this is a normal paragraph for change border style with css</p> <p class="b3"> this is a normal paragraph for change border style with css</p> <p class="b4"...

Tables in HTML

How to Use Table tag in HTML In this blog we understand the table elements in HTML. How to Create a Tables in HTML Firstly we understand table elements.  1. when we create a table in editor type with <table> 2. after that we create a table row with <tr> 3. between <tr> we create table data <td> see it into sublime text editor <body> <table border="1px"> <caption> Student Data</caption> <tr> <td> Name</td> <td>Roll NO</td> <td>Marks</td> <td>total Marks</td> <td>Percentage</td> </tr> <tr> <td> JOhn</td> <td>32655</td> <td>250</td> <td>500</td> <td>50%</td> </tr> <tr> <td> Carter</td> <td>1254</td> <td>250</td> <td>500</td> <td>50%</td> </tr> </table> W...