亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" input type="datetime"-local input type="email" input type="file" input type="hidden" input type="image" input type="month" input type="number" input type="password" input type="radio" input type="range" input type="reset" input type="search" input type="submit" input type="tel" input type="text" input type="time" input type="url" input type="week" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
characters

HTML(超文本標(biāo)記語言)元素通常是“塊級”元素或“內(nèi)聯(lián)”元素。塊級元素占據(jù)其父元素(容器)的整個(gè)空間,從而創(chuàng)建一個(gè)“塊”。本文有助于解釋這意味著什么。

瀏覽器通常在元素之前和之后用換行符顯示塊級元素。你可以將它們想象成一堆盒子。

一個(gè)塊級元素總是從一個(gè)新行開始,占用全部可用的寬度(盡可能地向左和向右伸展)。

以下示例演示了塊級元素的影響:

塊級元素

HTML

<p>This paragraph is a block-level element; its background has been colored to display the paragraph's parent element.</p>

CSS

p { background-color: #8ABB55; }

用法

  • 塊級元素可能只出現(xiàn)在<body>元素中。

Block-level vs. inline

塊級元素和內(nèi)聯(lián)元素之間有幾個(gè)關(guān)鍵的區(qū)別:

格式化默認(rèn)情況下,塊級元素以新行開始,但內(nèi)聯(lián)元素可以從行中的任何位置開始。內(nèi)容模型一般而言,塊級元素可能包含內(nèi)聯(lián)元素和其他塊級元素。在這種結(jié)構(gòu)性區(qū)分中固有的概念是塊元素創(chuàng)建“更大”的結(jié)構(gòu)比內(nèi)聯(lián)元素。

塊級和內(nèi)聯(lián)元素的區(qū)別在4.01以下的HTML規(guī)范中使用。在HTML5中,這種二元區(qū)別被更復(fù)雜的一組內(nèi)容類別所取代?!皦K級”類別大致對應(yīng)于HTML5 中流量內(nèi)容的類別,而“內(nèi)聯(lián)” 類別對應(yīng)于短語內(nèi)容,但還有其他類別。

元素

以下是所有HTML塊級元素的完整列表(盡管“塊級”在技術(shù)上未定義為HTML5中新增的元素)。

<address>聯(lián)系信息。  <article> HTML5   文章內(nèi)容。  <aside> HTML5   Aside內(nèi)容。<blockquote>長(“塊”)報(bào)價(jià)。  <canvas> HTML5   繪圖畫布。<dd>在描述列表中描述一個(gè)術(shù)語。<div>文檔部門。<dl>說明列表。<dt>說明列表術(shù)語。<fieldset>字段設(shè)置標(biāo)簽。    <figcaption> HTML5   圖標(biāo)題。  <figure> HTML5將   媒體內(nèi)容與標(biāo)題分組(請參閱<figcaption>)。  <footer> HTML5   部分或頁面頁腳。<form>輸入表單。  <h1><h2>,<h3><h4>,<h5>,<h6>  標(biāo)題級別1-6。  <header> HTML5   部分或頁面標(biāo)題。  <hgroup> HTML5  組頭信息。<hr>橫向規(guī)則(分界線)。<li>項(xiàng)目清單。<main>包含此文檔特有的中央內(nèi)容。<nav>包含導(dǎo)航鏈接。   <noscript>不支持或關(guān)閉腳本的內(nèi)容。<ol>有序列表。  <output> HTML5   表單輸出。<p>段。<pre>預(yù)先格式化的文本。    網(wǎng)頁的<section> HTML5部分。<table>表。<tfoot>表頁腳。<ul>無序列表。  <video> HTML5   視頻播放器。

Previous article: Next article: