Should I use a <div id="page-wrapper"> if I also have the <html> tag?

Should I use a <div id="page-wrapper"> if I also have the <html> tag?

the <html> tag should be where all your html code goes, it is not an element on the page

all your divs go inside the html tag
if you want a div that contains all the other elements it’s your choice

https://www.w3schools.com/tags/tag_html.asp

Yes, I know but I’m currently doing one of the projects and the sample one that I’m replicating (created by the FCC staff) starts off like this:

<div id="page-wrapper">
  <header id="header">
    <div class="logo">
      <img
        id="header-img"
        src="https://s3.amazonaws.com/freecodecamp/original_trombones.png"
        alt="original trombones logo"
      />
    </div>

Instead of that, my head looks like this:

<!DOCTYPE html>
<html>
  
  <head>
    <meta name=“viewport” content=“width=device-width,  initial-scale=1.0>
    <meta name=“keyboards” content=“Handcrafted, home-made, Premium, Shipping, quality, TROMBONE”>
    <meta charset="utf-8">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"></script>
    <title>Product Landing page </title>
  </head>
 
  <body>

his is the link to the codepen: https://codepen.io/freeCodeCamp/pen/RKRbwL?editors=1100

don’t look at the code of the sample project… do it on your own

on codepen you don’t need to add all those stuff, only those things that goes inside body, the things inside head can be added from the settings of the pen

codepen does a lot of things for you in the background

and if there is an user story telling you to put in a div with page-wrapper id then you need to do that

Yes, I know I’m not supposed to do all that but I just want to get in the habit of doing it :slight_smile: Would it be necessary to add the <div id="page-wrapper"> if I already have all that code?

div are not mandatory anywhere
it is just a div, it doesn’t have any special property on its own