how to write tags as content not as function? | SoloLearn: Learn to code for FREE!

+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.

10/7/2018 4:37:38 AM

el sujud

14 Answers

New Answer

+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

+5

&lt;tag&gt;

+4

&lt; less than (<) &gt; greater than (>) Works for other elements too: &quot; => quotation marks &amp; => ampersand (&) &copy; => copyright symbol etc.

+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.

+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.

+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.

+3

&trade; => trademark

+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?

+2

Congratulations, very well done! 😊👍

+2

+1

wow, your answer is great. a love you Anna. thanks so much. May God bless you.

+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

+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.

+1

Anna could u just explain the full form of &lt; and &gt; and what is the main purpose of it plzz