我想在我的网页上添加 <a>
和 <img>
,以便实际文本显示在页面上,而不是链接。
目前只显示了一个无法访问的图片... 我以为仅使用 <code>
可以防止这种情况,只显示普通的HTML代码?
Anyway, this is my current code, I want it to literally echo out <a href="/hello"><img style="" src="/hello.png" /></a>
in plain text.
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
background-color: #f5f5f5;
margin: 20px;
padding: 20px;
color: #f9f9f9;
background-color: #222;
text-shadow: 0 1px 0 #000;
border-radius: 8px;
border-bottom: 1px solid #555;
box-shadow: 0 1px 5px rgba(0,0,0,0.4) inset, 0 0 20px rgba(0,0,0,0.2) inset;
font: 16px/24px 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;
}
<pre>
<code>
<a href="/hello"><img style="" src="/hello.png" /></a>
</code>
</pre>
如果这个问题之前已经被问过了,我很抱歉,但我很难用言辞表达我的问题以找到一个好的答案。