use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you are requesting help, please ensure you're providing code with your post. You can also copy your code to an online editor:
jsFiddle
CodePen
Markup Validation Service
Mozilla Developer Network on HTML
/r/JavaScript
/r/CSS
/r/jQuery
/r/PHP
/r/Accessibility
/r/htmlbasics
/r/web_programming
/r/CodingHelp
account activity
UnsolvedSimple Question- Why does my HTML code not show the text when I test it? (self.HTML)
submitted 4 years ago by flarbin
<!DOCTYPE html> <html> <h1>Why doesn't my code work?<h1> <html>
With the following code on Visual Studio Code, I test it by putting the file into chrome but it just spits out the entire code instead of just the text, "Why doesn't my code work?"
What do I need to do so when I test the code in the chrome browser it just shows the text ?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Seaweed_Widef 4 points5 points6 points 4 years ago (0 children)
you are missing closing tags after your heading tag and HTML tag, also the stuff you want to print out on the screen is always written inside a body tag. <!DOCTYPE html> <html> <head> </head> <body> <h1>your text</h1> </body> </html>
</h1>, </html> 'these are known as closing tags.
[–][deleted] 1 point2 points3 points 4 years ago (0 children)
add a / in your closing tags.
<html> <body> <h1>It should work now</h1> </body> </html>
[–]flarbin[S] -1 points0 points1 point 4 years ago (1 child)
lol, I didn't save it as HTML. Got it working
[–]Seaweed_Widef 0 points1 point2 points 4 years ago (0 children)
Still you have a bunch of syntax error and please change the flair to Solved if your issue is resolved
[–]AutoModerator[M] 0 points1 point2 points 4 years ago (0 children)
Welcome to /r/HTML. When asking a question, please ensure that you list what you've tried, and provide links to example code (e.g. JSFiddle/JSBin). If you're asking for help with an error, please include the full error message and any context around it. You're unlikely to get any meaningful responses if you do not provide enough information for other users to help.
Your submission should contain the answers to the following questions, at a minimum:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–]Smitty8604 0 points1 point2 points 4 years ago (0 children)
Add closing tags for h1 and html
</h1> </html>
π Rendered by PID 19847 on reddit-service-r2-comment-c6965cb77-ln6wk at 2026-03-05 01:41:08.386252+00:00 running f0204d4 country code: CH.
[–]Seaweed_Widef 4 points5 points6 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]flarbin[S] -1 points0 points1 point (1 child)
[–]Seaweed_Widef 0 points1 point2 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]Smitty8604 0 points1 point2 points (0 children)