+ 7

Helle friend's, how can i make a juck of html code within an html document to be rendered as text....

I am writing a blog, so I want to give an HTML example, but I want the HTML example to be rendered as pure text, not to be included with the other HTML code... https://code.sololearn.com/Wulk2Rgp1xZF/?ref=app

28th Jun 2022, 12:56 PM
šŸ¤–Web GigšŸ¤–
šŸ¤–Web GigšŸ¤– - avatar
6 Answers
+ 6
Use &lt; and &gt; instead of < and > respectively. A lot more to write, but it works! Correct me if there is any other way
28th Jun 2022, 1:02 PM
šŸ‡ŗšŸ‡¦ GUMBALL šŸ‡ŗšŸ‡¦ [Dead account]
+ 4
You can try <pre> tag or there is lot of js library for hilighting codes in web view like highlight.js , prism.js etc.... You can try one of them for better appearance šŸ˜‰ šŸ™ šŸ™ƒšŸ‘
28th Jun 2022, 2:03 PM
慤 Tweetu šŸ˜† 慤慤
慤  Tweetu šŸ˜† 慤慤 - avatar
28th Jun 2022, 2:47 PM
šŸ¤–Web GigšŸ¤–
šŸ¤–Web GigšŸ¤– - avatar
28th Jun 2022, 1:04 PM
šŸ¤–Web GigšŸ¤–
šŸ¤–Web GigšŸ¤– - avatar
+ 2
Maybe with a little Javascript? ('<a_tag>Content</a_tag>').replace(/</g, '&lt;').replace(/>/g, '&gt;');
28th Jun 2022, 1:55 PM
Steve
Steve - avatar
+ 1
wrap it in a pre tag, it will preserve it or code tag
30th Jun 2022, 6:28 AM
āœ³AsterisKāœ³
āœ³AsterisKāœ³ - avatar