how to write tags as content not as function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

how to write tags as content not as function?

I tried to save my lessons on HTML in a simple web. some of the texts contain tags that i need to show up on my web. but in the code playground the tags always be read as functions so they turn red. i need them to stay white to come out after i press Run button. example i wrote this in the code room <p> Tables are defined by using the <table> tag. Tables are divided into table rows with the <tr> tag. Table rows are divided into table columns (table data) with the <td> tag. <br/>A border can be added using the border attribute</p> but i got this in the output room Tables are defined by using the tag. Tables are divided into table rows with the tag. Table rows are divided into table columns (table data) with the tag. A border can be added using the border attribute i want to have <table>, <tr>, <td>, and <br/> to show up in the output not executed. help me please.

7th Oct 2018, 4:37 AM
el sujud
el sujud - avatar
14 Answers
+ 16
Yes, I get it. &lt; will be replaced with <, &gt; will be replaced with >. You can write tags like this without actually using them: &lt;html&gt; => <html>. https://code.sololearn.com/WpqSUaIWpK7A/?ref=app
7th Oct 2018, 5:05 AM
Anna
Anna - avatar
+ 5
&lt;tag&gt;
7th Oct 2018, 4:50 AM
Anna
Anna - avatar
+ 4
&lt; less than (<) &gt; greater than (>) Works for other elements too: &quot; => quotation marks &amp; => ampersand (&) &copy; => copyright symbol etc.
8th Oct 2018, 6:09 AM
Anna
Anna - avatar
+ 4
Even before el sujud validates krishna falcon 's idea, I know it's not gonna be cool. It's a lesson that's been created and you now representing you tags like "< table>" might confuse a beginner as he/she might also write his/her tag in that way.
8th Oct 2018, 2:03 PM
Emmanuel
Emmanuel - avatar
+ 3
guess what Anna, after getting the answer from you...finally i can finish my first code. here https://code.sololearn.com/WV4mvRpKZOba/#html thanks my teacher.
7th Oct 2018, 2:32 PM
el sujud
el sujud - avatar
+ 3
Well, if you use &lt; and &gt; it's obvious what you want to do and every browser will understand that. If you add a space after the opening bracket, your browser might think that this was unintentional and show a warning.
8th Oct 2018, 4:42 AM
Anna
Anna - avatar
+ 3
&trade; => trademark
8th Oct 2018, 2:00 PM
Emmanuel
Emmanuel - avatar
+ 2
i can write <table>, <body>, <h1> and so others here, but how to write them in "code playground output"? do you get what i mean?
7th Oct 2018, 5:02 AM
el sujud
el sujud - avatar
+ 2
Congratulations, very well done! 😊👍
7th Oct 2018, 3:02 PM
Anna
Anna - avatar
+ 2
good
8th Oct 2018, 10:18 PM
Mostafa Mahmoud El Sayed
Mostafa Mahmoud El Sayed - avatar
+ 1
wow, your answer is great. a love you Anna. thanks so much. May God bless you.
7th Oct 2018, 5:12 AM
el sujud
el sujud - avatar
+ 1
Anna u advice is good but Just adding a space after the opening bracket of the tag will do the job Check the below Link https://code.sololearn.com/WypC3PgyQ4ZM
8th Oct 2018, 2:18 AM
krishna falcon
krishna falcon - avatar
+ 1
i am surprised knowing the answer from krishna falcon. so there are many ways to code to get the same aim. after giving several attention i got these points Anna's link has the right result and no error signs (both laptop and cellphone) Krishna falcon's link has the right result and error signs (opened in laptop) but when i opened using cellphone it doesn't show error signs. there must be some explanation for those above.
8th Oct 2018, 3:50 AM
el sujud
el sujud - avatar
+ 1
Anna could u just explain the full form of &lt; and &gt; and what is the main purpose of it plzz
8th Oct 2018, 5:55 AM
krishna falcon
krishna falcon - avatar