Skip to content
← Back to Community
HTML Comment Doubt 2
Profile icon

Er, so it is working on a repl. But in my exams, I will be having to do HTML Codes in Notepad, because of our REALLY bad internet connection. So I usually practice it in Notepad, and just to get the hang of it, I also practice on

But when I try this commenting in Notepad it doesn't seem to work, and in the browser, it keeps on getting displayed here:

In the tab address.

Any clues on what I'm doing wrong?

And my first HTML Comment Doubt is here

Profile icon
Profile icon

I know what your problem is. Because you are included the comment inside of your title tags it is displaying it in the tab as the title. You want to make your comments less specific (you will need fewer comments this way) and place them before the opening tag of the section you want to comment. Here is an example:

<!DOCTYPE html> <html> <!--This is the head section --> <head> <!--This is the title. It will appear in the browser tab --> <title> Tour of html </title> </head> <!--This is the body section. Anything written in this section will appear on the web page --> <body> <h1>Hello World</h1> </body> </html>
Profile icon