HOW TO CREATE A MULTI PAGE WEBSITE IN HTML
Tags: html, webdev, beginners, tutorial
Published: 2022-03-04 23:06:41

<p>There are two types of websites.</p>
<p>One is a single-page website (not to be confused with a SPA) that has all its content in a single HTML web page or an HTML document.</p>
<p>The other type is a website that has multiple pages (multiple HTML documents). Each HTML web page has different content in it. They might or might not share the common stylings, including the header and the footer elements.</p>
<h2>&nbsp;</h2>
<h2>Benefits Of Multi-Page Website</h2>
<p>A website that has limited content to display to the end users may use the benefits of a single-page website. But there are so many reasons why we see a lot of multi-page websites on the internet.</p>
<ul>
<li>A multi-page website segregates content on the website better. Rather than adding all the content for the website on a single page using headings, a multi-page website is able to better manage and showcase content on different pages based on the context.</li>
<li>A multi-page website offers better user flow and user experience. Users use the top navigation to navigate between web pages of a website. The navigation menu makes it clear that such and such content is at such and such page.</li>
<li>A multi-page website is search engine friendly. When you have a lot of content that differs in context between them, it's a great idea to have a multi-page website. Not only users would be able to better understand the contents of the website, but also search engine bots that crawl your website are able to better segregate the contents based on the web pages.</li>
</ul>
<h2>&nbsp;</h2>
<h2>Creating A Multi-Page Website In HTML</h2>
<p>Now that we know the benefits of a multi-page website, let's make a simple one in HTML.</p>
<h3>Step 1 - Creating our first HTML page</h3>
<p>Open a code editor like Visual Studio Code, Sublime Text or Notepad++. If you don't have any of the text editors, open a notepad.</p>
<p>Then create a basic HTML structure like the one below (I will provide the source code at the end of the blog)</p>
<p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiRRku6vzqJC-SW0UCo0Er_UXN2vP-gXbgfexincA9xH6CUCkmA1RoIeViRnmiqjr7QJJankZ3PE9VdC10Sx_4jhFFkItMGPKaqbUucEmwcrNZWBhDMCro1vfTKgyaxk8dbTrNbwErXovTqJIeIggKfFAlXYk8JzvvnWRIGinFeMIeE2ecVUnCvkBpI" rel="nofollow"><img alt="" data-original-height="401" data-original-width="808" src="https://blogger.googleusercontent.com/img/a/AVvXsEiRRku6vzqJC-SW0UCo0Er_UXN2vP-gXbgfexincA9xH6CUCkmA1RoIeViRnmiqjr7QJJankZ3PE9VdC10Sx_4jhFFkItMGPKaqbUucEmwcrNZWBhDMCro1vfTKgyaxk8dbTrNbwErXovTqJIeIggKfFAlXYk8JzvvnWRIGinFeMIeE2ecVUnCvkBpI=s16000" /></a></p>
<p>Save this notepad file in your preferred folder location and save it as <strong>index.html</strong></p>
<p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgDnkXhHeAxMXLUAc2nr_-b9DTbKKmBx276AJU8c9csMB3Lq8HQ1aJaMFc4lV40B2aE2Xo8UtATYMDweB3HGKEljS9fccs3VOPD62oSvejfsaZSSX_zMdqcU809Y3QiK6sEpEwzWgfV5LZCuPJ6rMYMKwzGuLRlrDYMSHvj_U0bEnNtBcWq6ihy_KxP" rel="nofollow"><img alt="" data-original-height="588" data-original-width="937" src="https://blogger.googleusercontent.com/img/a/AVvXsEgDnkXhHeAxMXLUAc2nr_-b9DTbKKmBx276AJU8c9csMB3Lq8HQ1aJaMFc4lV40B2aE2Xo8UtATYMDweB3HGKEljS9fccs3VOPD62oSvejfsaZSSX_zMdqcU809Y3QiK6sEpEwzWgfV5LZCuPJ6rMYMKwzGuLRlrDYMSHvj_U0bEnNtBcWq6ihy_KxP=s16000" /></a></p>
<p>Now, we will change the title and create a header for this web page</p>
<p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgi-bOhZ2jVzPI8hvZRPJeGCqkrosSZ4Y-_JL-dq8TDyHpWQSz93Muo0Aa5h6OrZPQZ70GVDA8CmaD0ZvBcqQBSLHbJFv6ZoZAEtEi6r2lEWK1yqYrMoKKlI69UJhZAxUh4pe6chhcm8QF4N-VjJtZYobpQZBV_lxa9EdeI7lcQBVB10rFfDoS67KbG" rel="nofollow"><img alt="" data-original-height="342" data-original-width="806" src="https://blogger.googleusercontent.com/img/a/AVvXsEgi-bOhZ2jVzPI8hvZRPJeGCqkrosSZ4Y-_JL-dq8TDyHpWQSz93Muo0Aa5h6OrZPQZ70GVDA8CmaD0ZvBcqQBSLHbJFv6ZoZAEtEi6r2lEWK1yqYrMoKKlI69UJhZAxUh4pe6chhcm8QF4N-VjJtZYobpQZBV_lxa9EdeI7lcQBVB10rFfDoS67KbG=s16000" /></a></p>
<p>&nbsp;</p>
<h3>Step 2: Creating Two More Web Pages</h3>
<p>Similar to how we created the home page, we will create two more web pages. The contact page and the about page. Our folder now looks like this.</p>
<p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhmXLdY6O04ptdiLU_SE6YD0kR3uxhMehUmQoQiKBSnI4iibaD1zNPHhPo77hzKyGy1FDUFg8EQ9sUFDQ--WyWCRtLZ1t2mLh1-v5vD-3ayLMohl5uSHsQsltyXAVCTQdOMsIOEYAyjTDI7BKFt64_XZcQjxgqtckvdUmqlj9aAGsdkbq2k9xvuTp_V"><img alt="" data-original-height="254" data-original-width="867" src="https://blogger.googleusercontent.com/img/a/AVvXsEhmXLdY6O04ptdiLU_SE6YD0kR3uxhMehUmQoQiKBSnI4iibaD1zNPHhPo77hzKyGy1FDUFg8EQ9sUFDQ--WyWCRtLZ1t2mLh1-v5vD-3ayLMohl5uSHsQsltyXAVCTQdOMsIOEYAyjTDI7BKFt64_XZcQjxgqtckvdUmqlj9aAGsdkbq2k9xvuTp_V=s16000" /></a></p>
<h3><strong>Step 3 - Linking Multiple Website Pages Together In HTML</strong></h3>
<p>It's now time to link the multiple pages that we have created on our website.</p>
<p>We will create a navigation menu that will link all of the pages together.</p>
<p>We will first change the code in our index.html page to the below:</p>
<p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjQGk1CkwyAHwGI3ndNekQEzh8OUFPeV33c_Dsc9PdB7SxOmV8wPToVQc7q9xvrT9fM6pC7Piao5_rPJcfk6zdlIOZ9wuh_WSXaieUXD1sxojCXKFGSOLhrurMCgsyt5i4ziKxxDduBJkQvV_VhmD04QbGbRZpYlP0T0G16zmEJJIRbZAMFcR9PQcLb"><img alt="" data-original-height="525" data-original-width="815" src="https://blogger.googleusercontent.com/img/a/AVvXsEjQGk1CkwyAHwGI3ndNekQEzh8OUFPeV33c_Dsc9PdB7SxOmV8wPToVQc7q9xvrT9fM6pC7Piao5_rPJcfk6zdlIOZ9wuh_WSXaieUXD1sxojCXKFGSOLhrurMCgsyt5i4ziKxxDduBJkQvV_VhmD04QbGbRZpYlP0T0G16zmEJJIRbZAMFcR9PQcLb=s16000" /></a></p>
<p>And we will copy this nav element to the other pages as well (about.html and contact.html)</p>
<h3>Step 4 - Running Our Multi-Page Website</h3>
<p>Now, go back to your folder where you have saved all your files.</p>
<p>Right click on the index.html file and open this file with the preferred browser.</p>
<p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj6MRaAAsI8Yxi_iHCrgG8nEGF-2dlG7m4kydGdJdVIT2C812jEzY3F1TfXNCJug276GEvyjdNGN3Mu1UHiCQms-EjFW_uW5PHgpFxLBWOjNhv3L2plKNklQ8jqVcsbux_ZYtRSazuKfrvgpiRy_V9sLslPr3d8go_iqfUY0qi7y0ZoQKozdFuNo6fZ"><img alt="" data-original-height="421" data-original-width="1008" src="https://blogger.googleusercontent.com/img/a/AVvXsEj6MRaAAsI8Yxi_iHCrgG8nEGF-2dlG7m4kydGdJdVIT2C812jEzY3F1TfXNCJug276GEvyjdNGN3Mu1UHiCQms-EjFW_uW5PHgpFxLBWOjNhv3L2plKNklQ8jqVcsbux_ZYtRSazuKfrvgpiRy_V9sLslPr3d8go_iqfUY0qi7y0ZoQKozdFuNo6fZ=s16000" /></a></p>
<h3>Result</h3>
<p>This will open your multi-page website in the browser.</p>
<p>Use the navigation on the top to navigate between pages. This is how you can make multi-page websites easily.</p>
<p>Change the content of the web pages to the content that you want to add to your website.</p>
<p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiyDym-WAlJguhMC9iWZeapDenb24hKq72jcw6jpjreEwagz14jTGpq6YmNu5zxiyLMdHSw2pCeR_r73v1VWTL1PQe1IKW_N61RkI33gtt6HtAfcpzz8jYuE8vZhWezfnwCzmzTF6u3E2RRGnQj6kp_ofuVdCI89p8k3H1uFwqSnbKJegBFw5cTYGC0=s999"><img alt="" border="0" data-original-height="469" data-original-width="999" src="https://blogger.googleusercontent.com/img/a/AVvXsEiyDym-WAlJguhMC9iWZeapDenb24hKq72jcw6jpjreEwagz14jTGpq6YmNu5zxiyLMdHSw2pCeR_r73v1VWTL1PQe1IKW_N61RkI33gtt6HtAfcpzz8jYuE8vZhWezfnwCzmzTF6u3E2RRGnQj6kp_ofuVdCI89p8k3H1uFwqSnbKJegBFw5cTYGC0=s16000" /></a></p>
<h2>Multi-Page Website In HTML - Source Code</h2>
Full Source Code For [HOW TO CREATE A MULTI PAGE WEBSITE IN HTML](https://codelikeadev.com/blog/create-multi-page-website-html)