Is h1 tag used inside double quotes | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is h1 tag used inside double quotes

23rd Aug 2017, 5:14 PM
Ankur Varshney
Ankur Varshney - avatar
4 Answers
+ 1
<h1> is an HTML tag. Since you're trying to apply HTML to the document that way, you'll put the tag inside of your write function. However, it's worth pointing out that there are better means of manipulating the document/elements on the page, and document.write() isn't the best method for doing that.
23rd Aug 2017, 5:23 PM
AgentSmith
+ 1
<h1></h1> EXAMPLE: <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6>
23rd Aug 2017, 5:18 PM
AgentSmith
0
so them this is also correct<h1> document.write("Hello World!<>");</h1>
23rd Aug 2017, 5:20 PM
Ankur Varshney
Ankur Varshney - avatar
0
thanx
23rd Aug 2017, 5:24 PM
Ankur Varshney
Ankur Varshney - avatar