Sharan Sondhi
Sharan Sondhi

Reputation: 87

How to print "<h1>Heading</h1>" in html

the problem is i want to output "<h1>heading</h1>" without skipping the heading tags....

<!DOCTYPE html>
   <html>
       <head>
         <meta charset="utf-8" />
           <title>first page</title>
       </head>
          <body>
            <h1>Heading</h1>
         </body>
  </html>

Upvotes: 0

Views: 3454

Answers (2)

Patrick Mutwiri
Patrick Mutwiri

Reputation: 1351

in php, you can do this print htmlspecialchars('<your tags/>') failure to which, you need to know the character code of the tag.

Upvotes: 0

Ishamael
Ishamael

Reputation: 12795

If I understand your question right, you want

&lt;h1&gt;Heading&lt;/h1&gt;

This will print:

<h1>Heading</h1>

Upvotes: 2

Related Questions