0
How to I give an example of a tag to use in HTML?
I want to write a web page showing a example of the <p> tag. How can I have the browser display "<p>" instead of running it?
13 Answers
+ 6
Use the escape characters < for < and > for > inside your paragraphs.
Ex: <p><p> is used for a paragraph.</p>
Result: <p> is used for a paragraph.
+ 5
Simply use <xmp> tag to show raw code of html in webpage like
<xmp> <code><pre><p>Hello</p></pre></code></xmp>
it output will be
<code><pre><p>Hello</p></pre></code>
Hope it helps
+ 2
you can actually replace < and > by < and > respectively.
So in your case, it would be something like <p> paragraph </p>
+ 1
not working. I need to escape the tags.
0
<p>p</p>
0
that would just display a p, not the whole code. I need to like comment out.
0
OK, so:
<p>p</p>
<br/>
/* This makes a p for use in website (paragraph). */
0
I hope it works. Thanks.
0
Sorry, meant p for comment section. Fix.
0
Sorry I wasn't clear. I want website to show <p>p</p>. however when I put it in the html, the browser thinks I want a paragraph with only the letter p.
0
Ya could add more for more info.
- 1
Sorry, so this should actually work. Lol. :
<p>p-This makes a paragraph</p>
<p>Use this in a website for a paragraph.</p>
<p>Example:</p>
<p> Use the <p > tag for a paragraph</p>
-Add br for breaks in paragraphs.
- 1
Because of the new update, your own codes don't work on your own profile. idk why.