xhtml代码 中<pre>元素简单介绍
生活随笔
收集整理的這篇文章主要介紹了
xhtml代码 中<pre>元素简单介绍
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<?xml version = "1.0" encoding = "UTF-8"?>
<!DOCTYPE htmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Common xhtml program files</title></head><body><p>The source text is identical in both these examples:if a is less <i>than</i> b thenprint " a is less than b"Elseprint "b is less than a"End if' a simple VEScript example</p><pre>The source text is identical in both these examples:if a is less than b thenprint " a is less than b"Elseprint "b is less than a"End if' a simple VEScript example </pre> </body> </html>
運行結果是:
總結:
(1)段落元素中所有間距被壓縮為單個間距。這是現在所有XHTML元素(除pre)的標準做法。
(2)<pre>元素的內容中所有的間距都被保留。大多數瀏覽器以一種等寬字體(如“Courier New”)來顯示<pre>?元素。
總結
以上是生活随笔為你收集整理的xhtml代码 中<pre>元素简单介绍的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 为什么要学Access?
- 下一篇: mysql触发器学习的一个小错误