Can one make HTML5 elements appear on the rendered version? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can one make HTML5 elements appear on the rendered version?

I really don't know how to ask this question, but I'm gonna try to explain. I want to write a code trying to explain how, for instance, a paragraph element works, but in order to do that, I'm gonna have to write on my code: <p> this is the paragraph text</p>. The problem is if I write the paragraph tags, the tags will be omitted on the rendered version and I want this specific sentence, with the tags, to appear on the rendered version as an example for those who are reading, for example, a webpage article that teaches HTML5 and whatnot. Does my question make sense? Is there any mechanism I could wrap HTML5 elements so they can be rendered WITH their tags? I tried to find this question on other posts, but I couldn't find any similar question.

16th Dec 2018, 10:49 AM
Marcos Rodrigo Sousa
Marcos Rodrigo Sousa - avatar
3 Answers
+ 5
There's a trick for it replace < by &lt; replace > by &gt; eg)<p>Hello World!!</p> can be written as &lt;p&gt;Hello World!!&lt;/p&gt;
16th Dec 2018, 11:00 AM
Rishi Anand
Rishi Anand - avatar
+ 5
If I understood you correctly, perhaps you can try to write it this way; <p>&lt;p&gt;Paragraph content&lt;/p&gt;</p> &lt; = < symbol &gt; = > symbol Hth, cmiiw
16th Dec 2018, 11:01 AM
Ipang
+ 5
Rishi Anand and Ipang: Thank you for your help. The examples you guys wrote I could only see entity related to the symbols on my cell phone. On my computer, the entities “& l t” and “& g t” (with no space between the characters) appears as their respective symbols (“<“ and “>”). When I saw your comments on my computer browser I was confused because it appears like this: “There is a trick for it replace < by < replace > by >” But on my cell phone, I saw the characters you guys wrote and that the computer browser automatically read as the respective symbol of those two entities. Based on your comments, I found on the W3School website about these Special Entities and their characters rendered on the browsers. Here it is: https://www.w3schools.com/html/html_entities.asp _____ Thank you, guys!!!
16th Dec 2018, 11:38 AM
Marcos Rodrigo Sousa
Marcos Rodrigo Sousa - avatar