0

How to use <code> tag?

how to use <code> tag in HTML

5th Dec 2017, 4:17 PM
Akhilesh Gupta
Akhilesh Gupta - avatar
3 Respostas
+ 11
It's just another text element that styles the inner text to look like a piece of code... Just styling nothing special... <code>Text</code>
5th Dec 2017, 4:49 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
By this you can define a piece of code
5th Dec 2017, 5:37 PM
#RahulVerma
#RahulVerma - avatar
- 1
The <code> tag is used to display blocks of code. The correct way to use it (as far as I know) is: <pre>      <code>         puts "hello!"      </ code> </ pre> There are many tutorials on how to add syntax highlighting with pygments, highlight.js, etc. https://scotch.io/tutorials/get-beautiful-syntax-highlighting-for-your-website-code
5th Dec 2017, 7:03 PM
Mickel
Mickel - avatar