HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-02-21
1 <p>Every project, in due time, will reach the point where it's time to publish it for everyone to have access to it (specifically, on the Internet). This may be because you've finished the project or want to test it on different devices. In any case, as artists say, you should not do an idle work, you must show your projects.</p>
1 <p>Every project, in due time, will reach the point where it's time to publish it for everyone to have access to it (specifically, on the Internet). This may be because you've finished the project or want to test it on different devices. In any case, as artists say, you should not do an idle work, you must show your projects.</p>
2 <p>To upload your project on the Internet, you need a<em>host</em>- a special server that will store your files and provide access to them through a special<em>domain name</em>(for example, right now, you're on a site with the domain name<em>hexlet.io</em>).</p>
2 <p>To upload your project on the Internet, you need a<em>host</em>- a special server that will store your files and provide access to them through a special<em>domain name</em>(for example, right now, you're on a site with the domain name<em>hexlet.io</em>).</p>
3 <p>In this lesson, we'll look at the free GitHub hosting service you can use to put your layout online. Since we now have some simple pages created using HTML and CSS, we'll need<em>hosting for static websites</em>. These sites don't use the complex logic associated with databases and programming languages that run on a server. So, we just need a server to store our files and open them on demand.</p>
3 <p>In this lesson, we'll look at the free GitHub hosting service you can use to put your layout online. Since we now have some simple pages created using HTML and CSS, we'll need<em>hosting for static websites</em>. These sites don't use the complex logic associated with databases and programming languages that run on a server. So, we just need a server to store our files and open them on demand.</p>
4 <p>In essence, the server will do everything that your computer did when you created the layout on it:</p>
4 <p>In essence, the server will do everything that your computer did when you created the layout on it:</p>
5 <ul><li>The operating system will query the hard disk or RAM</li>
5 <ul><li>The operating system will query the hard disk or RAM</li>
6 <li>The hard disk or RAM will give back the contents of the file that was queried</li>
6 <li>The hard disk or RAM will give back the contents of the file that was queried</li>
7 <li>Your browser will process the data it has received and display the result</li>
7 <li>Your browser will process the data it has received and display the result</li>
8 </ul><h2>Preparing the page</h2>
8 </ul><h2>Preparing the page</h2>
9 <p>If you want to put a page on the internet, you need to create it first. So that we can focus on the placement process, our page will consist of one HTML file and one CSS file. Let's perform the following steps:</p>
9 <p>If you want to put a page on the internet, you need to create it first. So that we can focus on the placement process, our page will consist of one HTML file and one CSS file. Let's perform the following steps:</p>
10 <ul><li>Create a directory on your computer. This is the first part of the creation of any website. Always keep your work in different directories so that you can easily find or transfer it later</li>
10 <ul><li>Create a directory on your computer. This is the first part of the creation of any website. Always keep your work in different directories so that you can easily find or transfer it later</li>
11 <li>In the directory that has been created, create the files<em>index.html</em>and<em>style.css</em></li>
11 <li>In the directory that has been created, create the files<em>index.html</em>and<em>style.css</em></li>
12 <li>Link a CSS file to your HTML file. Don't forget to create a basic markup for the site</li>
12 <li>Link a CSS file to your HTML file. Don't forget to create a basic markup for the site</li>
13 </ul><p>Create any markup you want. Don't be afraid to experiment with styles. Let your imagination run wild :) For example, it could be a little bit of information about you. I created just such a description, and it looks like this:</p>
13 </ul><p>Create any markup you want. Don't be afraid to experiment with styles. Let your imagination run wild :) For example, it could be a little bit of information about you. I created just such a description, and it looks like this:</p>
14 <p><strong>index.html</strong><em>inside the body tag</em></p>
14 <p><strong>index.html</strong><em>inside the body tag</em></p>
15 <p><strong>style.css</strong></p>
15 <p><strong>style.css</strong></p>
16 <h2>GitHub Pages</h2>
16 <h2>GitHub Pages</h2>
17 <p>No matter what profession they study at<em>Hexlet</em>, students are sure to become familiar with<em>git</em>and its main incarnation,<em>GitHub</em>. You may have already heard of this code repository. It's an incredibly useful and convenient system, it's difficult to imagine modern development without it. For now, we're interested in the fact that<em>GitHub</em>allows you to host a static site for free. This is done using the<a>GitHub Pages</a>service.</p>
17 <p>No matter what profession they study at<em>Hexlet</em>, students are sure to become familiar with<em>git</em>and its main incarnation,<em>GitHub</em>. You may have already heard of this code repository. It's an incredibly useful and convenient system, it's difficult to imagine modern development without it. For now, we're interested in the fact that<em>GitHub</em>allows you to host a static site for free. This is done using the<a>GitHub Pages</a>service.</p>
18 <p>Of course, you need to know the basics of<em>Git</em>to do the job, but even without them, we can upload the simple page we created in this lesson.</p>
18 <p>Of course, you need to know the basics of<em>Git</em>to do the job, but even without them, we can upload the simple page we created in this lesson.</p>
19 <p>It's time to upload your page:</p>
19 <p>It's time to upload your page:</p>
20 <ul><li>Sign up for<a>GitHub</a>if you haven't already</li>
20 <ul><li>Sign up for<a>GitHub</a>if you haven't already</li>
21 <li><a>Create a new repository</a>. A repository is a place where your project code is stored. Use username.github.io as the repository name, where username is your username on GitHub</li>
21 <li><a>Create a new repository</a>. A repository is a place where your project code is stored. Use username.github.io as the repository name, where username is your username on GitHub</li>
22 </ul><ul><li>Upload the<em>index.html</em>and<em>style.css</em>files you created to GitHub. You can do this by adding /upload/ to the URL of your repository page. You'll get a link that looks like<strong><a>https://github.com/username/username.github.io/upload/</a></strong>, where the<strong>username</strong>is your GitHub username. Once you've selected the files, click<em>Commit changes</em></li>
22 </ul><ul><li>Upload the<em>index.html</em>and<em>style.css</em>files you created to GitHub. You can do this by adding /upload/ to the URL of your repository page. You'll get a link that looks like<strong><a>https://github.com/username/username.github.io/upload/</a></strong>, where the<strong>username</strong>is your GitHub username. Once you've selected the files, click<em>Commit changes</em></li>
23 </ul><ul><li>Go to the repository settings. In the left menu, click the<em>Pages</em>tab. If you've done everything according to the instructions, GitHub will automatically activate the site at the specified link. If the name of the repository is different, you must select the<em>main</em>branch under<em>Source</em></li>
23 </ul><ul><li>Go to the repository settings. In the left menu, click the<em>Pages</em>tab. If you've done everything according to the instructions, GitHub will automatically activate the site at the specified link. If the name of the repository is different, you must select the<em>main</em>branch under<em>Source</em></li>
24 </ul><p>Done! Now you can look at your page by following the link that<em>GitHub</em>has given you</p>
24 </ul><p>Done! Now you can look at your page by following the link that<em>GitHub</em>has given you</p>