HTML5 元素示例

  1. 容器
  2. - 导航
  3. - 排版
  4. 数据展示
  5. 数据录入
  6. 反馈
  7. 插槽
  8. 遗留

容器

元素(Element)说明
divGeneric flow container, or container for name-value groups in dl elements
spanGeneric phrasing container
headerIntroductory or navigational aids for a page or section
sectionGeneric document or application section
navSection with navigational links
searchContainer for search controls
mainContainer for the dominant contents of the document
asideSidebar for tangentially related content
articleSelf-contained syndicatable or reusable composition
footerFooter for a page or section

示例:

div
span
header
section
search
main
article
footer

元素(Element)说明
menuMenu of commands
aHyperlink
mapImage map
areaHyperlink or dead area on an image map
hrThematic break

示例:

  • menu 1
  • menu 2
  • menu 3
  • context menu 1
  • context menu 2
  • context menu 3
  • toolbar menu 1
  • toolbar menu 2
  • toolbar menu 3
  • #typo_blank targetcurrent targetmailtotel

    排版

    元素(Element)说明
    hgroupHeading container
    h1-h6Heading
    pParagraph
    addressContact information for a page or article element
    strongImportance
    bKeywords
    emStress emphasis
    iAlternate voice
    smallSide comment
    supSuperscript
    subSubscript
    delA removal from the document
    sInaccurate text
    insAn addition to the document
    uUnarticulated annotation
    rubyRuby annotation(s)
    rtRuby annotation text
    rpParenthesis for ruby annotation text
    abbrAbbreviation
    dfnDefining instance
    bdoText directionality formatting
    bdiText directionality isolation
    wbrLine breaking opportunity
    brLine break, e.g. in poem or postal address
    qQuotation
    blockquoteA section quoted from another source
    citeTitle of a work
    codeComputer code
    sampComputer output
    varVariable
    kbdUser input
    markHighlight
    preBlock of preformatted text
    dlAssociation list consisting of zero or more name-value groups
    dtLegend for corresponding dd element(s)
    ddContent for corresponding dt element(s)
    olOrdered list
    ulList
    liList item
    tableTable
    captionTable caption
    colgroupGroup of columns in a table
    colTable column
    theadGroup of heading rows in a table
    tbodyGroup of rows in a table
    tfootGroup of footer rows in a table
    trTable row
    thTable header cell
    tdTable cell
    dataMachine-readable equivalent
    timeMachine-readable equivalent of date- or time-related data

    示例:

    hgroup

    h1

    h2

    h3

    h4

    h5
    h6

    p

    🏠 位置

    ☎️ 电话

    📧 邮箱

    strong b em i small sup sub del s ins u 東京とうきょう東京 abbr HTML dfn《红楼梦》bdo rtl bdi
    q
    blockquote
    cite code samp var kbd mark
    pre <p>Hello, & welcome to <strong>Comate</strong>!</p>
    dt
    dd
    dt
    dd
    1. li
    2. li
    caption
    thth
    tdtd
    tdtd
    衫衣

    数据展示

    元素(Element)说明
    figureFigure with optional caption
    figcaptionCaption for figure
    pictureImage
    imgImage
    iframeChild navigable
    embedPlugin
    objectImage, child navigable, or plugin
    canvasScriptable bitmap canvas
    audioAudio player
    videoVideo player
    sourceImage source for img or media source for video or audio
    trackTimed text track

    示例:

    figcaption
    picture

    数据录入

    元素(Element)说明
    formUser-submittable form
    fieldsetGroup of form controls
    legendCaption for fieldset
    labelCaption for a form control
    inputForm control
    textareaMultiline text controls
    selectList box control
    optgroupGroup of options in a list box
    optionOption in a list box or combo box control
    datalistContainer for options for combo box control
    buttonButton control
    outputCalculated output value

    示例:

    legend


    output <p>Hello, & welcome to <strong>Comate</strong>!</p>

    反馈

    元素(Element)说明
    progressProgress bar
    meterGauge
    dialogDialog box or window
    detailsDisclosure control for hiding details

    示例:

    dialog
    summary
    div
    • li
    • li

    插槽

    元素(Element)说明
    templateTemplate
    slotShadow tree slot

    示例:


    遗留

    元素(Element)说明
    param
    dir
    font
    frameset
    frame
    marquee