Start a New HTML Project in GitHub with VSCode

1. Create a new repository in GitHub.

New Repository

2. Clone your new repository with VSCode

Clone

3. Add files to your project with VSCode

New File

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>
<body>
    
    <script src="script.js"></script>
</body>
</html>

4. Push your changes to GitHub

New File

New File

New File

New File

5. Turn on GitHub Pages

The .html file can be viewed as a web page when the file is named index.html and GitHub Pages is turned on.

New File

New File

The index file can be an .html file or a .md file. (.md files are usually used when you use GitHub’s template system Jekyll.) index.md will be displayed by default over index.html if both are present.


Categories : GitHub   HTML