HTML - Tags - <code>

#27 of 147
code
Next col
Prev cite

 <html>
 <body>
     To display short filenames in DOS, type:
     <code>dir /x</code>
 </body>
 </html>
 

The code element represents a fragment of computer code. Note: fragment implies a few words or less.

A live example:


To display short filenames in DOS, type: dir /x

Note that code is an inline element and will not result in a line break, whereas pre is a block level element and will start a new line.

N of

Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath