0

I have searched the internet for hours trying to find someone else who shared my issue, but it seems to be entirely unique to me.

So basically, I launch my very small HTML file with live server, but only 2 divs are loaded on the webpage, and I have no idea why. I have tested it and narrowed it down to purely being an issue caused by live server, as my html file loads completely fine when the file itself is double-clicked on from file explorer, and I still have the issue when i remove my links to my css and js files from the hmtl file.

this happens on the simplest of code, and its so annoying.

here is some simple code:

enter image description here

and here is the screenshot of the elements not loading:

enter image description here

and i also show the "code injected by live server" bit, cause i think that might be the issue?

please help, this is driving me crazy. ps. i am a newbie to live server and website making.

Flying Nat
  • 31
  • 5

1 Answers1

1

There can only be one body tag in whole HTML file. You can try this instead :

<html>
  <head>
    <title>HTML page</title>
  </head>
  <body>
    <div>
      <p>text</p>
    </div>
    <div>
      <p>text</p>
    </div>
    <div>
      <p>text</p>
    </div>
    <div>
      <p>text</p>
    </div>
  </body>
</html>
  • I feel really dumb now, thank you so much. I tried two other methods of viewing the html file and both work, so why does this only cause an issue with Live Server? – Flying Nat Oct 10 '20 at 01:14