HTML Element Categories(html元素分类)

来源:互联网 发布:sqlserver海量数据查询 编辑:程序博客网 时间:2024/05/01 11:02

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 definedNameDescriptionCommentADDRESSSupplies 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 textDepreciatedNOFRAMESAlternate 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 elementsFORMUsed 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

NameDescriptionCommentDIRDirectory ListDepreciatedDLDefinition 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.

-NameDescriptionPurposeCommentAPPLETFor 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 elementIFRAMEInline frame-(Depreciated)INSMarks inserted contentPhraseBoth a block and inline elementMAPEstablishes 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

NameDescriptionPurposeCommentAAnchor--ABBRDenotes an abbreviationPhrase-ACRONYMDenotes an acronym.--AREADefine a map region in an image.Inside the MAP element-BBoldFont-BASEFONTAllows font changes-DepreciatedBDOOverrides 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 textFontDepreciatedSAMPDenotes 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 underlinedFontDepreciatedVARDenotes a variablein a program.Phrase-
原创粉丝点击