title 如何在pre顯示html的原始碼
description 如何在pre顯示html的原始碼
datetime 2014-10-22 12:35:57
tags html
category coding
link html-put-html-source-code-in-pre
file 2014-10-22-123557-html-put-html-source-code-in-pre
template post
end
想在pre中顯示html的程式碼:
<pre>
<p class="mk-red"> RED </p>
</pre>
可是程式碼都會被解讀成html...
<pre>
RED
</pre>
簡言之不使用跳脫字元就是做不到,這篇SO的解答寫的還蠻詳細的。