xhtml中的五个块元素
生活随笔
收集整理的這篇文章主要介紹了
xhtml中的五个块元素
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
xhtml有5個塊元素(或許有更多),分別是<p><div><h1~h6><blockquote><pre>?
<p>是段落,段落的顯示取決于瀏覽器,通常在段落前后各有一個空文本行。
<div>是分割,它其實是一個樣式元素,通常在這個元素的前后各有一個換行,不是內置的垂直距離。自己的感想是,div和其他塊元素之間有一個換行,但是div之間卻沒有換行的,也就是div之間沒有空行。
<h1><h2><h3><h4><h5><h6>,是標題,<h1>最大,<h6>最小
<pre>是保留,自己的理解是,pre內的所有空格都會被保留。
<blockquote>是塊引用,塊引用是樣式的,也是描述性的,用于顯示引用。一般加個引號。不加 也可以。塊引用左右各有頁邊距。
?
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml-transitional.dtd"><html xmlns = "http://www.w3.org/1999/xhtml" xml:lang ="en" lang= "en"><head><title> This is my first title</title> </head><body><p>THis is prargraph</p><div>This is a div text.</div><div>THis is a div text too</div><h1>This is h1</h1><h2>This is h2</h2><h3>This is h3</h3><h4>This is h4</h4><blockquote>"The is a blockquote ,and this is a good text ,because this is a blockquote ,so it has a quote."</blockquote> <pre>This is a pre,and time is fly, so we must value our time.Xhtml 's grammar is more complex...</pre></body> </html> ~運行結果是:
THis is prargraph This is a div text. THis is a div text too This is h1 This is h2 This is h3 This is h4"The is a blockquote ,and this is a good text ,because this is a blockquote ,so it has a quote."This is a pre,and time is fly, so we must value our time.Xhtml 's grammar is more complex...?
總結
以上是生活随笔為你收集整理的xhtml中的五个块元素的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 问题:c语言简单的循环和字符串,错在哪里
- 下一篇: 关联容器的插入操作简单举例