My practice webpage is completely empty and I do not know why

49 Views Asked by At
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="description" content="This is a practice website">
<title>Everything Practice</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="Resources/css/index.css" rel="stylesheet" type="text/css">
</head>
<html>
<body>

<!--Title and Banner-->

<header>
<title>
  <h1>Flip 'n' Sell</h1>
<title>

<nav>
  <ul>
      <li>Home</li>
      <li>Info</li>
      <li>Help</li>
      <li>Selling</li>
  </ul>
 </nav>
 </header>

 </body>
 </html>`

Here is my html for my page so far and here is my css. As you can see, all that I have done is styled it to where the default margin and padding is nonexistent. What when I load this up and look at the webpage, there's nothing, nothing at all. What am I doing wrong. I still new to this all by the way.

* {
margin: none;
padding: none;
box-sizing: border-box;
}
2

There are 2 best solutions below

1
Tactless On BEST ANSWER

Move the opening <html> tag to under the Doctype declaration before the <head> tag, and change or remove the <title> tag from your body.

The title tag is defining a title for the entire document (what's shown on the browser tab) and may be causing some confusion when rendering the page.See W3 School's post on the title tag

0
Edwin Cruz On
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="description" content="This is a practice website">
        <title>Everything Practice</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="Resources/css/index.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <!--Title and Banner-->
        <header>
            <h1>Flip 'n' Sell</h1>
            <nav>
                <ul>
                    <li>Home</li>
                    <li>Info</li>
                    <li>Help</li>
                    <li>Selling</li>
                </ul>
            </nav>
        </header>
     </body>
 </html>

The fix was your title tag was not terminated. Needed the corresponding </title> but in reality the title tag does not belong there and should be removed as I did in my example.