Learn, Share, Build

185
October 03, 2017, at 11:26 AM

When I right-click on my html doc and select open with web browser, the browser opens, but shows no content. My other HTML docs in other projects work just fine, but for some reason, this will not display anything. Any suggestions?

Answer 1

Your page doesn't actually have any content, hence why you are not seeing any. HTML written in the <head> section is not rendered on the page, but rather is used to load external files and hold metadata. The <body> section is what gets written to the page itself:

<html> 
 
<head> 
  <title>Not visible</title> 
</head> 
 
<body> 
  Visible! 
</body> 
 
</html>

The <title> element simply sets the name that is shown in the tab. If you want to create a title on the page itself, you're probably looking to create an <h1> element (as you've already created some styling for such an element).

Hope this helps! :)

READ ALSO
Learn, Share, Build

Learn, Share, Build

I have a function

177
Learn, Share, Build

Learn, Share, Build

I'm trying to create sortable menu by using isotopeLong story short:

182
Learn, Share, Build

Learn, Share, Build

I'm writing some JS code that does the following: it will query a Mongo DB for some resultsAssuming a collection of documents comes back, it will search for the most recent date of the collection of objects, compute some missing dates and then insert...

183
Learn, Share, Build

Learn, Share, Build

I am building a simple web platform that contains two pages: a homepage with a button that users click to access the second page, a registration formCurrently, I am using jquery for the redirect and Python Tornado for the backend server

137