+ 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
6 Respuestas
+ 6
Use < and > instead of < and > respectively. A lot more to write, but it works! Correct me if there is any other way
+ 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 😉
🙏
🙃👍
+ 3
ㅤMr. N♡ ♡N€☆ ㅤㅤ thanks bro ..
+ 2
🇺🇦 GUMBALL 🇺🇦 ok bro...
+ 2
Maybe with a little Javascript?
('<a_tag>Content</a_tag>').replace(/</g, '<').replace(/>/g, '>');
+ 1
wrap it in a pre tag, it will preserve it or code tag