
When you write , you'll be mixing valid HTML tags with invalid ones, which can cause unexpected behavior in your browser. hello
Firstly, is a valid HTML tag that defines the largest heading, commonly used for main titles or titles in a document. Tagging "hello" within the will appropriately make it appear as a large heading.
However, is not a valid HTML tag. The correct tag for paragraphs is .
Browsers tend to be forgiving and may try to interpret the code as best as they can, often treating unknown tags like as just normal text:
The word
"hello"will be shown as a large heading."hello world"might appear as plain text right after"hello", still within the heading tag without any paragraph styling.
If you intended to have a paragraph inside the heading, use instead:
hello
hello world
But be careful, nesting a inside an is not standard practice, and it might still lead to formatting confusion. Typically, paragraphs should stand alone or be placed within sections or divs, but not headings.
Hope this helps! Feel free to ask more questions if you’re curious about different HTML tags and their usage.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer