首頁 > web前端 > css教學 > 主體

塊元素block element和內聯元素inline element_CSS/HTML

WBOY
發布: 2016-05-16 12:11:48
原創
1325 人瀏覽過

內聯級元素(inline-level element)中試圖插入區塊級(block-level element)元素。這樣做是不允許的。唯一的能在內聯元素中插入區塊級元素的例外是object標籤。那麼什麼是內聯級元素(inline-level element)和區塊級(block-level element)元素呢? 。

塊元素(block element)一般是其他元素的容器元素,塊元素一般都從新行開始,它可以容納內聯元素和其他塊元素,常見塊元素是段落標籤''P"。 「form"這個塊元素比較特殊,它只能用來容納其他塊元素。了css以後,我們可以改變這個html的預設版面模式,把區塊元素擺放到你想要的位置上去。一種,table based layout和css based layout從一般使用者(不包括視力障礙者、盲人等)的角度來看這兩種佈局,除了頁面載入速度的差別外,沒有其他的差別。用戶不經意點了查看頁面原始碼按鈕後,兩者所表現出來的差異就非常大了。快速的閱讀。的話,那就更容易理解了。貼到一張空白的新紙上。 inline element)一般都是基於語意級(semantic)的基本元素。

Block element and inline element are both concepts in the HTML specification. The basic difference between block elements and inline elements is that block elements generally start on a new line. When CSS control is added, this attribute difference between block elements and inline elements no longer becomes a difference. For example, we can add an attribute such as display:block to the inline element cite, so that it also has the attribute of starting from a new line every time.


The basic concept of a variable element is that it needs to determine whether the element is a block element or an inline element based on the context. Variable elements still belong to the above two element categories. Once the context determines its category, it must follow the rules of block elements or inline elements. See full text for rough element classification.

ps: Regarding the Chinese name of inline element, there are many kinds of inline elements, inline elements, inline elements, and inline elements. Basically there is no unified translation, just call it whatever you want. In addition, when talking about inline elements, we will think of a display attribute called display:inline; this attribute can fix the famous IE double floating border problem.

block element
* address - address
* blockquote - block quote
* center - alignment block
* dir - directory list
* div - Commonly used block levels are easy and are also the main tags of css layout
* dl - Definition list
* fieldset - form control group
* form - Interactive form
* h1 - Big title
* h2 - Subtitle
* h3 - Level 3 title
* h4 - Level 4 title
* h5 - Level 5 title
* h6 - Level 6 title
* hr - Horizontal dividing line
* isindex - input prompt
* menu - menu list
* noframes - frames optional content, (for browsers that do not support frames, display this block content
* noscript -) optional script content (for browsers that do not support frames) Browsers that do not support script will display this content)
* ol - sorted form
* p - paragraph
* pre - formatted text
* table - table
* ul - unsorted list

Inline element
* a - Anchor point
* abbr - Abbreviation
* acronym - First word
* b - Bold (not recommended)
* bdo - bidi override
* big - big font
* br - line break
* cite - quotation
* code - computer code (required when citing source code)
* dfn - Define field
* em - Emphasis
* font - Font setting (not recommended)
* i - Italic
* img - Picture
* input - Input box
* kbd - Define keyboard text
* label - table label
* q - short quote
* s - underscore (not recommended)
* samp - define sample computer code
* select - project selection
* small - small font text
* span - commonly used inline container, defining text blocks
* strike - underline
* strong - bold emphasis
* sub - bottom Superscript
* sup - Superscript
* textarea - Multi-line text input box
* tt - Telex text
* u - Underline
* var - Define variable

Variable elements
Variable elements determine whether the element is a block element or an inline element according to the context.

* applet - java applet
* button - button
* del - delete text
* iframe - inline frame
* ins - inserted text
* map - picture Block (map)
* object - object object
* script - client script

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!