I've been teaching myself HTML lately and I was trying to test my new knowledge creating an actual HTML file from scratch.
I am using a Mac so after reading many online guides I used TextEdit to manage and edit my code.
So I write in all my code. Save it as name.html (making sure that the file is indeed HTML and not name.html.txt) and then I launch it with google chrome only to find out that my code is not interpreted as HTML but as plain text.
Why is this happening and how can I make the HTML be interpreted as HTML?
I tried modifying my code by removing some spaces also double checking everything was correct I even tried using other browsers with no success...
So here's my code:
<!DOCTYPE html>
<html>
<head>
<title>This is a test</title>
</head>
<body>
<h1>This is a quick test</h1>
<p>This website is made for personal use so I can try out my new knowledge on HTML5 and CSS.</p>
</body>
</html>
This exact same code is being displayed like this when I launch it in my browser: (Browser screenshot)
It's a problem with TextEdit. Open it with another editor and save it again. See if that fixes it.
You can also edit TextEdit so it will work with HTML. You can learn do that here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With