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  

TYPE OF HTML CSS

 Types of HTML CSS To change a HTML documents style Three Types to Add CSS in HTML 1.      Inline CSS: To using by <p style> change a style of HTML Attribute.      2.     Internal CSS: by using <style> tag in the below of <head> tag.           3.    External CSS : By using <link> element in link to external CSS file. INLINE CSS We use inline CSS in a line      Example : <p style=“color:green;”> Green Text </p> Here we use inline css… INTERNAL CSS In this section we use Internal CSS.      We use <style> element under the <head> section. Example:           <style>                 p {color:green ;}                      </style> EXTERNAL CSS External CSS create a new fil...

Forms Tag in HTML

Forms tag in HTML πŸ‘‰ The forms tag is used to create an HTML form for user input.. πŸ‘‰ In this Blog i will show you how to create a form and its tags, attributes. πŸ‘‰ Let's Start Firstly we  create a form start with <form> tag </form> <form action=" serverlink " method="POST" autocomplete="off"> <fieldset >  <legend> Registration form</legend> Note: Firstly we create a Label tag  <label for="fname" class="fname"> First Name </label> </br> πŸ‘‰We use input type ="text" for  get a user information in text. like name address, and other info.           <input type="text" name="fname" id="fname"> </br> </br> <label for="lname"> Last Name </label></br> <input type="text" name="lname" id="lname"> </br> </br> πŸ‘‰     When we want a user email id so we...