HTML CSS

WAYS TO ADD CSS IN HTML

DIRECTLY ADD STYLES TO ELEMENT <p style="color:red">   Hello World!  </p>

INLINE CSS

01

ADD STYLES IN THE DOCUMENT HEAD <head>   <style>   h1 { color: red }   p { font-weight: bold }   </style> </head>

02

INTERNAL CSS

LOAD EXTERNAL CSS FILES <head>   <link rel="stylesheet" href="style.css"> </head>

03

EXTERNAL CSS

IMPORT EXTERNAL CSS FILES <head>  <style>   @import url("style.css");   h1 { color: red }  </style> </head>

04

IMPORT CSS