Different Ways To Bring Css Into The Html File

THERE ARE THREE WAYS TO BRING:

  1. INLINE STYLING:- we can use this styling directly in the HTML element with the help of the style attribute. They have a higher priority so They can override any other CSS styling. FOR EXAMPLE:-

     <p style="color: aqua;" >hello duniya</p>
    
  2. INTERNAL STYLING:- IT can also use inside the HTML document with the help of style elements. STYLE element should be put inside the head element of the HTML file.

     <head>
         <title>CSS</title>
         <!-- internal_styling -->
          <style>
             p{
                 color: blueviolet;
             }
             body{
                 background-color: aqua;
             }
         </style> 
     <head/>
    
  3. EXTERNAL ELEMENT:- IN this styling we can make a separate file of CSS which have to link with our HTML file with the help of the link element. we have to put a link element inside the head tag. At present most developers prefer external styling methods for bringing CSS. In the link element, we have to write the name of the HTML FILE in the href attribute.

      <link rel="stylesheet" href="lec13.css">