css - Steps for linking External style sheet

Create the CSS File:

Save it with a .css extension.

  • Example: style.css

  • write your css rules in styles.css
  1. Create or Open the HTML File:

    • Save it with a .html extension.

    • Example: index.html

    • locate the section
    • This links the CSS file to your HTML.

      Use the Tag Inside the Section:

       

     
    html>
    <html>
    <head>
    <title>My Web Page</title>
    <link rel="stylesheet" href="style.css">
    </head>
    <body>
    <h1>Hello, World!</h1>
    </body>
    </html