The heading


#1

I did not use ‘/’ in the closing tag,but still the heading which I wrote between the tags displayed in the preview. Something like this

Welcome to CodeBlocks!

So is this a syntax error which wont run on an actual platform right?


#2

html5 allows the closing tag to be omitted, however as you can see in your forum post, now both lines are heading, given you have 2 heading opening tags


#3

I don’t know how the second line turned out to be a heading, that wasn’t written between tags.
The first phrase however was written between tags.
Anyway thank you for pointing out the fact the HTML5 is fine with not using ‘/’ in the closing tag.
Just a clarification,will it run without any syntax errors while making a website?
Again, thank you for your input.


#4

because you have two <h1> opening tags. So it will register as two headings of type h1

that is not what i said, i said the closing tag can be omitted. If you want the closing tag, the slash is needed.


#5

Oh! Now everything is clear. Thank You :slight_smile:


#6

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