HTML Element Categories(html元素分类)

It is important to be aware, when using HTML and style sheets that HTML elements are categorized into several categories. Some style properties apply to some categories of elements and not to others. The following types of elements exist:

  • Block - Include a line break before and after the element.
  • Inline - Included with the text as part of a line.
  • List Item - Elements that support providing a list of items. List item elements are block level elements.

Block HTML Elements

A block with centered contents is defined
NameDescriptionComment
ADDRESSSupplies contact information for the document-
BLOCKQUOTEUsed to quote in block form-
CENTERDepreciated-
DIVA container allowing specific style to be added to a block of text.-
DIRA container allowing specific style to be added to a block of text.-
FRAMESETA container allowing multiple frames (HTML documents) to be placed on a web browser.-
H1, H2, H3, H4, H5, H6Headings-
HRHorizontal rule-
ISINDEXAn input prompt for a single line of textDepreciated
NOFRAMESAlternate content for browsers that do not support frames.-
NOSCRIPTAlternate content for browsers that cannot run script programs-
PParagraph - Should not contain other block elements including tables, but may contain list elements-
PREPreformatted text is rendered with spaces and carriage returns as typed.-
TABLEUsed to present an ordered set of data. Table subelements work as block elements.Includes table sub elements
FORMUsed to present a form to the client. Form subelements work as block elements.-

List item elements are also considered to be block elements.


List-item Elements

NameDescriptionComment
DIRDirectory ListDepreciated
DLDefinition List-
LIList Item-
OLOrdered (numbered) List-
ULUnordered List-


Block/Inline HTML Elements

The elements in this list may be considered block or inline elements, depending on how they are used. They are considered inline elements if used inside a paragraph (P) or another inline element.

-
NameDescriptionPurposeComment
APPLETFor placing Java applets in the page.-(Depreciated)
BUTTONUsed to define a FORM submit, reset, or push button.--
DELUsed to indicate deleted contentPhraseBoth a block and inline element
IFRAMEInline frame-(Depreciated)
INSMarks inserted contentPhraseBoth a block and inline element
MAPEstablishes an image map to be used with an IMG or OBJECT element--
OBJECTUsed to include applets, images, videos and sound on the web page.--
SCRIPTDefines a script to be run on the client computer.--

Inline HTML Elements

NameDescriptionPurposeComment
AAnchor--
ABBRDenotes an abbreviationPhrase-
ACRONYMDenotes an acronym.--
AREADefine a map region in an image.Inside the MAP element-
BBoldFont-
BASEFONTAllows font changes-Depreciated
BDOOverrides text direction with values of ltr (left to right) or rtl (right to left).--
BIGSets size of text to bigFont-
BRBreakTreated special by style sheets.-
CITEUsed to mark titles of articles or other publications.Phrase-
CODEDenotes computer program code.Phrase-
DFNDenotes a definition.Phrase-
EMDenotes emphasisPhrase-
FONTAllows font changes.-(Depreciated)
ISets text to italicsFont-
IMGAllows placement of a graphical image in the page.--
INSDenotes inserted text.Phrase-
KBDDenotes information typed from the keyboard.Phrase-
PARAMUsed to add additional parameters to the object or applet elements.--
QUsed for short quotations--
SStrike through textFontDepreciated
SAMPDenotes a sample.Phrase-
SMALLSets text size to smallFont-
SPANA container used to set special style to specific areas of the page.--
STRIKESets text to have a line struck through itFont-
STRONGDenotesPhrase-
SUBSubscript--
SUPSuperscript--
TEXTAREAA form for multiline text input.--
TTSets text style to monospaced teletypeFont-
USets text underlinedFontDepreciated
VARDenotes a variablein a program.Phrase-
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值