admin管理员组文章数量:1279234
Does anyone have an example on how to use HTML5 code
tag in order to display HTML code?
I tried to do that but it failed.
Afterwards, I tried to use highlight.js but still no luck.
Any suggestions?
Demo
Does anyone have an example on how to use HTML5 code
tag in order to display HTML code?
I tried to do that but it failed.
Afterwards, I tried to use highlight.js but still no luck.
Any suggestions?
Demo
Share Improve this question asked Jun 11, 2012 at 17:36 glarkouglarkou 7,10112 gold badges69 silver badges122 bronze badges 2- Highlight.js is perfect for what you are looking for. What is wrong with your attempt to try it? have you seen the demos? softwaremaniacs/media/soft/highlight/test.html – John Riselvato Commented Jun 11, 2012 at 17:40
- Take a look at the demo. It is not working. I tried the demos. I am not sure what I am doing wrong. No error or something. Neither HTML5 or Highlight.js are working – glarkou Commented Jun 11, 2012 at 17:41
2 Answers
Reset to default 8The HTML code
tag has nothing to do with beautifying. It simply indicates its content as puter code, and by default it causes it to be rendered in a monospace font. That’s all.
To get help with beautification, I suggest that you open a new question and post your best effort so far (not links to general resources but to code that you actually tried) and explain what you wish to achieve.
You would need to replace <
tag with <
and >
with >
. Only by escaping these characters can you see the html code
本文标签: javascriptHow to use HTML5 code tag to beautify codeStack Overflow
版权声明:本文标题:javascript - How to use HTML5 code tag to beautify code - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741247632a2365187.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论