How to use <code> tag? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite

How to use <code> tag?

how to use <code> tag in HTML

5th Dec 2017, 4:17 PM
Akhilesh Gupta
Akhilesh Gupta - avatar
3 Réponses
+ 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 - 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.
5th Dec 2017, 7:03 PM
Mickel - avatar