Page showing up as source text

When I create a simple file as follows and save it as a .html document and then doubleclick it or open it from a browser I am getting the full source text. It is not interpreting it as a web page. What am I missing?

<!DOCTYPE html>
<html lang="en">
<head>
	<title> a simple page</title>
</head>
<body>
	<p>Here is the body of my page</p>		
</body>
</html>

If you are on Windows I wonder if you have the folder set to “hide file extensions” and the full file name is eg index.html.txt or some such?

This solution would also apply to your other post re PHP7/8.

Actually on a mac and just checked and all file extensions are set to show.

Strange. If I create a new HTML file in Dreamweaver and paste in the code from the file I createed in Word and the text editor, it works fine. Exact same code and both with the .html extension. One displays on the web page as the source code the other renders as a web page with the proper title and text. Same code as previously posted.

What do you get if you upload one of your test files to a live server?

Could you post and share the files somewhere like Dropbox or Google Docs so we can examine them to see if we can see the problem, or rule out a problem with the files themselves?

Well, for whatever reason, now it works. Suddenly. I always like to be able to duplicate a problem once it is fixed but in this case I don’t know where to start to do that. I changed a bunch of things just trying different iterations and once put back together and going through the path a different way it now works. Some things are best just left alone. lol. Thanks for your time, it is appreciated.

1 Like

Thank you for letting us know. It’s annoying when people just go quiet when they fix a problem.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.