HTML & CSS for Beginners Part 21: How to create a basic website layout - the HTML

Kevin Powell · Beginner ·🌐 Frontend Engineering ·9y ago
Skills: HTML & CSS90%

Key Takeaways

Kevin Powell creates a basic website layout using HTML, covering the structure and content of a website, including a header, main content area, sidebar, and footer.

Full Transcript

hey and welcome to the end of this series this is a little sad that we're here but we're at the end and I just want to cover making a really basic layout and here we have a very basic layout this is what we're going to be building together a nice big header area a main content area with a sidebar and a footer down at the bottom looks simple but if you can do this you can build this is the real foundational skills of making really nice websites [Music] so I'm really doing this one from scratch so the first thing I need to do is make a new folder on my desktop and I'm going to call this my first oops my first layout and then I'm going to right click on there and choose open with atom which is the code editor that I've been using for this whole series now I don't have much of a layout but whenever I am doing layouts I like having the visual here while I'm working it just makes it a little bit easier so I'm going to keep this on the side for the beginning part here so I just hit a control or command n to make a new file or of course you can use your file new file and I'm right away going to save that because I want to tell Adam this is an HTML file and I'm inside my first layout the home page which will be the only page in this demo but will be my index.html and now I'm ready to start writing something so the first thing we always need to do is declare the doctype doc type HTML and so we're telling the browser that we have an HTML file and then we have to open our HTML tag and close our HTML tag to tell the browser that we're this is where our HTML is next we need two other tags we need a head close head and I need my body close body so I have my doctype then I have my HTML tags inside of there I have an open head closed head and I have my body close body so if you remember from earlier on our head is where we put the extra information and the bodies where we put the content that we'll actually be seeing on the screen so I'm first going to come into my head here and we're going to give this The Meta tag for our car set which is one of the important ones and pretty much everyone will always just be using utf-8 uh we're gonna look at another meta tag that I haven't looked at that's fine uh we're gonna do meta name is author and content is Kevin what this is um it's letting people know who the author of The the site is so yeah you just put what your name is the content so the name of this meta tag is author so we're letting it know it's an author tag and I'm putting the content as Kevin so the author is Kevin which is me and the next one is something we have seen before close title my first layout great so I'm going to save that and while we're here we might as well open this up in the browser so let's just move this over so we can see what we're doing at the same time and I like setting this up so it takes up about half my window and this on the other half and there we go I have a blank layout but we can see that the title is working so the next thing I want to do we want to come into our body and we want to start putting some content in there so we might as well jump down here and come and we're going to do three different parts to this or four we're going to start with our header and close the header and while I'm doing this I might as well pull this up so my header is this big thing here and it's a tag we haven't looked at it works a lot like a div would it's exactly like a div except it actually means something a div is an abstract box in this case it's not an abstract box it's the header of my site it's where things like your logo and your navigation go so we have our header then we have this area down here that has this area plus a sidebar over here so we're going to start by doing a div class here and close and this is my container so my container will hold everything right in the middle of the screen it's going to hold these things in place so they're not touching the sides and inside there I have two things I have a section close section and I have an aside and close aside so a section is sort of what the name implies it's a section of my website and the aside is like a sidebar so a couple new tags but again these just like the header they work just like a div it's a box that's just holding there to hold some content but it's letting the website know a little bit more uh the website it's letting the browser know a little bit more information about what its purpose is and then down at the bottom we will have our footer close footer and that's about it as far as actually putting in the tags now we just have to actually have some content that we're going to put in here so I'm going to start by getting rid of this so we just have our blank page there so if I save this and refresh nothing actually changes all of this is in place but without any content in there we don't see anything quite yet so in my header let's come and just put the title of my website H1 my first website close H1 okay let's refresh hey then there we go awesome so now let's come down to our section and I'm just going to use some filler text in my section here we'll start off with a heading so another H1 close H1 and then we'll do a paragraph close paragraph and another paragraph close paragraph just so we have some stuff that's in there this is the main content area of this page and here uh it's a bit long let's put two short paragraphs in there so this is just some Laura some text it doesn't actually mean anything at all and re save refresh and there we go I have my two paragraphs and we'll jump down over to here we have an aside so I'll put an H2 inside my side along with and let's go with an ordered list just for fun so open ordered list close ordered list and in there list item close list item and let's just do list item one again just to fill this up why we'd have a list item in a sidebar and you know maybe you're linking to some websites you like this is my sidebar awesome and at the very end down here inside my footer I'll come down and just put a nice simple paragraph close paragraph and we'll grab a little bit of filler text just to throw in there and there we go there's my footer and as far as the actual HTML placing the content on the page that's it I'm gonna throw the CSS side of things in a separate video so that you should see that on the screen right now you can click on that and jump into the CSS so I look forward to seeing you there if you have any questions about this whole section and header and aside and footer thing leave it down in the comments below if you like the hip video hit the little thumbs up and I'll see you in the next one where we actually make this look like a real website

Original Description

In this video I write the markup (or HTML) for a very common website, with a header, main content area and a sidebar, plus a footer. If you're jus learning how to write HTML and CSS, and you have any issues with things like floats and clears, or are curious how other people approach things, this video is for you! --- Half Bit by Kevin MacLeod is licensed under a Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/) Source: http://incompetech.com/music/royalty-free/?keywords=%22half+bit%22 Artist: http://incompetech.com/
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Kevin Powell · Kevin Powell · 23 of 60

1 How to create an awesome navigation bar with HTML & CSS
How to create an awesome navigation bar with HTML & CSS
Kevin Powell
2 Improve your CSS by Keepin' it DRY
Improve your CSS by Keepin' it DRY
Kevin Powell
3 HTML & CSS for Beginners Part 6: Images
HTML & CSS for Beginners Part 6: Images
Kevin Powell
4 HTML & CSS for Beginners Part 7: File Structure
HTML & CSS for Beginners Part 7: File Structure
Kevin Powell
5 HTML & CSS for Beginners Part 4: Bold and Italic text and HTML comments
HTML & CSS for Beginners Part 4: Bold and Italic text and HTML comments
Kevin Powell
6 HTML & CSS for Beginners Part 5: Links
HTML & CSS for Beginners Part 5: Links
Kevin Powell
7 HTML & CSS for Beginners Part 3: Paragraphs and Headings
HTML & CSS for Beginners Part 3: Paragraphs and Headings
Kevin Powell
8 HTML and CSS for Beginners Part 1: Introduction to HTML
HTML and CSS for Beginners Part 1: Introduction to HTML
Kevin Powell
9 HTML and CSS for Beginners Part 2: Building your first web page!
HTML and CSS for Beginners Part 2: Building your first web page!
Kevin Powell
10 HTML & CSS for Beginner Part 8: Introduction to CSS
HTML & CSS for Beginner Part 8: Introduction to CSS
Kevin Powell
11 HTML & CSS for Beginners Part 9: External CSS
HTML & CSS for Beginners Part 9: External CSS
Kevin Powell
12 HTML & CSS for Beginners Part 10: Divs & Spans
HTML & CSS for Beginners Part 10: Divs & Spans
Kevin Powell
13 HTML & CSS for Beginners Part 11: Classes & IDs
HTML & CSS for Beginners Part 11: Classes & IDs
Kevin Powell
14 HTML & CSS for Beginners Part 12: The CSS Box Model - Margin, Borders & Padding explained
HTML & CSS for Beginners Part 12: The CSS Box Model - Margin, Borders & Padding explained
Kevin Powell
15 HTML & CSS for Beginners Part 13: Background Images
HTML & CSS for Beginners Part 13: Background Images
Kevin Powell
16 HTML & CSS for Beginners Part 14: Style Text with CSS
HTML & CSS for Beginners Part 14: Style Text with CSS
Kevin Powell
17 HTML & CSS for Beginners Part 15: How to style links
HTML & CSS for Beginners Part 15: How to style links
Kevin Powell
18 HTML & CSS for Beginners Part 16: CSS selectors and Specificity
HTML & CSS for Beginners Part 16: CSS selectors and Specificity
Kevin Powell
19 HTML & CSS for Beginners Part 17: How to Create and Style HTML Lists
HTML & CSS for Beginners Part 17: How to Create and Style HTML Lists
Kevin Powell
20 HTML & CSS for Beginners Part 18: How Floats and Clears work
HTML & CSS for Beginners Part 18: How Floats and Clears work
Kevin Powell
21 HTML & CSS for Beginners Part 19: Colors with CSS - hex, rgba, and hsla
HTML & CSS for Beginners Part 19: Colors with CSS - hex, rgba, and hsla
Kevin Powell
22 HTML & CSS for Beginners Part 20: How to center a div
HTML & CSS for Beginners Part 20: How to center a div
Kevin Powell
HTML & CSS for Beginners Part 21: How to create a basic website layout - the HTML
HTML & CSS for Beginners Part 21: How to create a basic website layout - the HTML
Kevin Powell
24 HTML & CSS for Beginners Part 22: How to create a basic layout - the CSS
HTML & CSS for Beginners Part 22: How to create a basic layout - the CSS
Kevin Powell
25 How to Create a Responsive Website from Scratch - Part 1: The HTML #Responsive #HTML5
How to Create a Responsive Website from Scratch - Part 1: The HTML #Responsive #HTML5
Kevin Powell
26 How to Create a Responsive Website from Scratch - Part 2: The Header and Hero area #Responsive #CSS3
How to Create a Responsive Website from Scratch - Part 2: The Header and Hero area #Responsive #CSS3
Kevin Powell
27 How to Create a Responsive Website from Scratch - Part 3: The About Section #Responsive #CSS
How to Create a Responsive Website from Scratch - Part 3: The About Section #Responsive #CSS
Kevin Powell
28 How to Create a Responsive Website from Scratch - Part 4: Building a Responsive Portfolio Section
How to Create a Responsive Website from Scratch - Part 4: Building a Responsive Portfolio Section
Kevin Powell
29 How to Create a Responsive Website from Scratch - Part 5: Call To Action and Footer #CSS #Responsive
How to Create a Responsive Website from Scratch - Part 5: Call To Action and Footer #CSS #Responsive
Kevin Powell
30 Tutorial: Learn how to use CSS Media Queries in less than 5 minutes
Tutorial: Learn how to use CSS Media Queries in less than 5 minutes
Kevin Powell
31 End of the year upate and what's coming to my channel to start the new year
End of the year upate and what's coming to my channel to start the new year
Kevin Powell
32 Create a CSS only Mega Dropdown Menu
Create a CSS only Mega Dropdown Menu
Kevin Powell
33 CSS Tutorial: Outline and Outline Offset
CSS Tutorial: Outline and Outline Offset
Kevin Powell
34 CSS Blending Modes
CSS Blending Modes
Kevin Powell
35 Parallax effect | 2 different ways to add it with jQuery
Parallax effect | 2 different ways to add it with jQuery
Kevin Powell
36 CSS Units: vh, vw, vmin, vmax #css #responsive #design
CSS Units: vh, vw, vmin, vmax #css #responsive #design
Kevin Powell
37 How to Create a Website - Complete workflow | Part 01: Intro + Setting things up
How to Create a Website - Complete workflow | Part 01: Intro + Setting things up
Kevin Powell
38 100 Subscribers speed coding bonus video
100 Subscribers speed coding bonus video
Kevin Powell
39 How to Create a Website - Complete workflow | Part 02: The Markup #HTML
How to Create a Website - Complete workflow | Part 02: The Markup #HTML
Kevin Powell
40 How to Create a Website - Complete workflow | Part 03: Sass Variables and a Mixin #Sass
How to Create a Website - Complete workflow | Part 03: Sass Variables and a Mixin #Sass
Kevin Powell
41 How to Create a Website - Complete workflow | Part 04: Setting up the hero and header
How to Create a Website - Complete workflow | Part 04: Setting up the hero and header
Kevin Powell
42 How to Create a Website - Complete workflow | Part 05: Typography & Buttons
How to Create a Website - Complete workflow | Part 05: Typography & Buttons
Kevin Powell
43 How to Create a Website - Complete workflow | Part 06.1: Building the navigation with Flexbox
How to Create a Website - Complete workflow | Part 06.1: Building the navigation with Flexbox
Kevin Powell
44 How to Create a Website - Complete workflow | Part 06.2: Making the nav work with jQuery
How to Create a Website - Complete workflow | Part 06.2: Making the nav work with jQuery
Kevin Powell
45 Redesigning & Coding My Website #CreateICG
Redesigning & Coding My Website #CreateICG
Kevin Powell
46 How to Create a Website - Complete workflow | Part 07: Starting the flexbox grid
How to Create a Website - Complete workflow | Part 07: Starting the flexbox grid
Kevin Powell
47 How to Create a Website - Complete workflow | Part 08: Promo & Problem shooting!
How to Create a Website - Complete workflow | Part 08: Promo & Problem shooting!
Kevin Powell
48 How to Create a Website - Complete workflow | Part 09: The CTA and Footer
How to Create a Website - Complete workflow | Part 09: The CTA and Footer
Kevin Powell
49 How to Create a Website - Complete workflow | Part 10: Making it responsive
How to Create a Website - Complete workflow | Part 10: Making it responsive
Kevin Powell
50 How to Create a Website - Complete workflow | Part 11: Making it responsive con't
How to Create a Website - Complete workflow | Part 11: Making it responsive con't
Kevin Powell
51 How to Create a Website - Complete workflow | Part 12: Putting the site online
How to Create a Website - Complete workflow | Part 12: Putting the site online
Kevin Powell
52 Create a Custom Grid System with CSS Calc() and Sass
Create a Custom Grid System with CSS Calc() and Sass
Kevin Powell
53 CSS em and rem explained #CSS #responsive
CSS em and rem explained #CSS #responsive
Kevin Powell
54 Should you use Bootstrap?
Should you use Bootstrap?
Kevin Powell
55 How to add Smooth Scrolling to your one page website with jQuery
How to add Smooth Scrolling to your one page website with jQuery
Kevin Powell
56 Let's learn Bootstrap 4
Let's learn Bootstrap 4
Kevin Powell
57 How I approach designing a website - my thought process
How I approach designing a website - my thought process
Kevin Powell
58 Build a website with Bootstrap 4 - Part 1: The setup
Build a website with Bootstrap 4 - Part 1: The setup
Kevin Powell
59 Build a website with Bootstrap 4 - Introduction
Build a website with Bootstrap 4 - Introduction
Kevin Powell
60 Build a website with Bootstrap 4 - Part 2:  Customizing Variables
Build a website with Bootstrap 4 - Part 2: Customizing Variables
Kevin Powell

This video teaches how to create a basic website layout using HTML, covering the structure and content of a website. Kevin Powell demonstrates how to write the HTML code for a website with a header, main content area, sidebar, and footer.

Key Takeaways
  1. Create a new folder and open it with a code editor
  2. Declare the doctype and create the HTML tags
  3. Add the head and body tags
  4. Create the header, main content area, sidebar, and footer sections
  5. Add content to each section
  6. Use meta tags to provide extra information about the website
💡 Using semantic HTML tags such as header, section, and aside can help improve the structure and accessibility of a website.

Related Reads

📰
Next.js vs Remix vs SvelteKit: Which Framework Should You Learn?
Learn how to choose between Next.js, Remix, and SvelteKit for your next project and why it matters for your career as a developer
Dev.to · Etrit Neziri
📰
Had my Frontend Developer interview with Capgemini (Application Developer) today, and I wanted to…
Prepare for a frontend developer interview with Capgemini by reviewing JavaScript fundamentals and practicing common interview questions
Medium · JavaScript
📰
10 Frontend Developer Tools to Boost Productivity in 2026
Boost frontend productivity with 10 essential tools for modern web app development
Medium · Programming
📰
10 Frontend Developer Tools to Boost Productivity in 2026
Boost frontend productivity with top 10 developer tools in 2026
Medium · JavaScript
Up next
The masks we wear | Zora Krstić | TEDxLuxembourgCity
TEDx Talks
Watch →