Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use HTML5 code tag to beautify code

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

like image 824
glarkou Avatar asked Aug 05 '26 21:08

glarkou


1 Answers

The HTML code tag has nothing to do with beautifying. It simply indicates its content as computer 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.

like image 142
Jukka K. Korpela Avatar answered Aug 07 '26 12:08

Jukka K. Korpela



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!