How to print code on HTML

前端 未结 7 1758
再見小時候
再見小時候 2020-12-03 21:17

I want to display code characters on an HTML page. But no matter what I try it always renders HTML characters. pre or code doesn\'t work. How can I

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 21:40

    You need to use character references instead of the plain characters themselves:

    <HTML>
    

    The elements code and pre are just to mark the content as code or preformated.

提交回复
热议问题