Is h1 tag used inside double quotes | Sololearn: Learn to code for FREE!

0

Is h1 tag used inside double quotes

8/23/2017 5:14:09 PM

Ankur Varshney

4 Answers

New Answer

+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.

+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>

0

so them this is also correct<h1> document.write("Hello World!<>");</h1>

0