Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

HTML Not Displaying Correctly in VSCode

I just started in VSCode and I’m trying to make a website. I have a basic HTML code and when I run it, it displays the code that I have into a tab in Chrome instead of what the actual website would be like.my code before runningwhat displays after running

I tried creating a new file, uninstalling and reinstalling VSCode, and it still doesn’t work.

<html>
    <body>
    <h1>The Template Element</h1>
<p>Click the button below to display the hidden content from the template element.</p>
<button onclick = "showContent()"> Button</button> 
<h2>Flower</h2>
<img src = "images/Cello Wallpapers - Wallpaper Cave.jpg" width = "214" height ="204">
    </body>
</html>

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Name your file with a .html file extension. Otherwise, the browser doesn’t really know the type of file you want it to open and treats it like text.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading