Creating Your First Web Page | HTML | CSS


Creating your first webpage using HTML, CSS, JavaScript.

Start by creating a file called index.html. Every html page has a .html extension. Inside the html file you have three main tags, html, head and body tag.

All your HTML content comes inside the html tag. Inside the html tag you define your head and body tag.

<html>
  <head>

  </head>

  <body>
  </body>
</html>

For styling up your HTML page you can make use of stylesheets which you can define inside the head tag. Let’s say you have a stylesheet called style.css. You can add the stylesheet to the index.html page using the link tag.

<html>
  <head>
    <link href="style.css" rel="stylesheet" />
  </head>

  <body>
  </body>
</html>

You can also add JavaScript files to your index.html file from the head tag.

<html>
  <head>
    <link href="style.css" rel="stylesheet" />
    <script src="script.js"></script>
  </head>

  <body>
  </body>
</html>

The body tag contains the content of the web page. Let’s say you want to add a heading you can add it inside the body tag.

<html>
  <head>
    <link href="style.css" rel="stylesheet" />
    <script src="script.js"></script>
  </head>

  <body>
    <h2>
      Welcome to HTML !!
    </h2>
  </body>
</html>