Relation with External Style Sheet

     

  • Place the below mentioned link in the HEAD tag of CSS; to provide the relation between CSS and HTML file.
  •  

  • "Link tag" enables to provide the relation between HTML file to CSS
  • We have to place the below mentioned syntax in HEAD portion of HTML file.
  • It indicates the connection/relation to CSS file
  • <head>
    <title>Name of your page</title>
    <link href="nameofyourstylesheet.css" rel="stylesheet " type="text/css">
    </head>

  •  

     

     

    Code:

    <html>
    <head>

    <title>Name of your page</title>
    <link href="nameofyourstylesheet.css" rel="stylesheet " type="text/css">
    </head>

    <body>

    <p>Hi Every one <br>Welcome to this web page<br>It consists of Html Tags and <br>CSS Style sheets</P>

    </body>
    </html>