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?

7th Dec 2016, 1:25 AM
Rose
13 Answers
+ 6
Use the escape characters &lt; for < and &gt; for > inside your paragraphs. Ex: <p>&lt;p&gt; is used for a paragraph.</p> Result: <p> is used for a paragraph.
7th Dec 2016, 2:22 AM
Tamra
Tamra - avatar
+ 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
7th Dec 2016, 2:28 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 2
you can actually replace < and > by &lt; and &gt; respectively. So in your case, it would be something like &lt;p&gt; paragraph &lt;/p&gt;
7th Dec 2016, 2:20 AM
CHMD
CHMD - avatar
+ 1
not working. I need to escape the tags.
7th Dec 2016, 1:51 AM
Rose
0
<p>p</p>
7th Dec 2016, 1:27 AM
ROBLOX Game Developer
0
that would just display a p, not the whole code. I need to like comment out.
7th Dec 2016, 1:39 AM
Rose
0
OK, so: <p>p</p> <br/> /* This makes a p for use in website (paragraph). */
7th Dec 2016, 1:41 AM
ROBLOX Game Developer
0
I hope it works. Thanks.
7th Dec 2016, 1:41 AM
ROBLOX Game Developer
0
Sorry, meant p for comment section. Fix.
7th Dec 2016, 1:42 AM
ROBLOX Game Developer
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.
7th Dec 2016, 1:45 AM
Rose
0
Ya could add more for more info.
7th Dec 2016, 1:48 AM
ROBLOX Game Developer
- 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.
7th Dec 2016, 1:47 AM
ROBLOX Game Developer
- 1
Because of the new update, your own codes don't work on your own profile. idk why.
7th Dec 2016, 1:52 AM
ROBLOX Game Developer