Getting Started With HTML and CSS

Creating Your First HTML File

The first thing we need to do when building out first website is create the index.html file. This requires us to open up an empty index.html file. The first thing we need to do when building out first website is create the index.html file. This requires us to open up an empty index.html file.

index.html
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Example HTML5 Document</title>
    </head>
    <body>
        <p>Test</p>
    </body>
</html>

Creating Your First JavaScript Script

Then we need to create a script.js file outside of our HTML file! This allows us to add JavaScript functionality to our application.

script.js
let text = "";

for (let i = 0; i < 5; i++) {
  text += "The number is " + i + "<br>";
}

console.log(text);