article element.General Document Structure
These are elements unique to the document. Instead of showing inline examples we highlight the respective element in this document.
Document root
- Selectors
 html/:root- Example
 - Highlight document root.
 
Content root
- Selector
 body- Example
 - Highlight content root.
 
The document’s main content
- Selector
 main- Example
 - Highlight main content.
 
The document’s main header
- Selector
 :where(body, body > div) > header- Example
 - Highlight main header.
 - See also
 - For the 
headerelement in general see Sectioning Scope Specific Elements. 
The document’s main footer
- Selector
 :where(body, body > div) > footer- Example
 - Highlight main footer.
 - See also
 - For the 
footerelement in general see Sectioning Scope Specific Elements. 
The current target element
- Selector
 :target- Example
 - Highlight me.
 
Sectioning
Sections
- Selector
 section- Example
 - 
          
I am a sectionelement.sectionelement stand-alone - Selector
 article- Example
 - 
          
I am an articleelement stand-alone - Selector
 aside- Example
 - 
          
asideelement stand-alone - Selector
 nav- Example
 - 
          
navelement stand-alone 
Heading Content
- Selectors
 h1,h2,h3,h4,h5,h6- Examples
 - 
          
I am an
h1element.h1element stand-aloneI am an
h2element.h2element stand-aloneI am an
h3element.h3element stand-aloneI am an
h4element.h4element stand-aloneI am an
h5element.h5element stand-aloneI am an
h6element.h6element stand-aloneI am an
h1element.I am an
h2element.I am an
h3element.I am an
h4element.I am an
h5element.I am an
h6element.h1–h6combinedI am an
h1element.I am an
h2element.I am an
h3element.I am an
h4element.I am an
h5element.I am an
h6element.h1–h6surrounded byps - Selector
 hgroup- Examples
 - 
          
I am an
h1element in anhgroupelement.I am a
pelement grouped with that heading.hgroupwithh1andpI am an
h2element in anhgroupelement.I am a
pelement grouped with that heading.hgroupwithh2andpI am an
h3element in anhgroupelement.I am a
pelement grouped with that heading.hgroupwithh3andpI am an
h4element in anhgroupelement.I am a
pelement grouped with that heading.hgroupwithh4andp 
Sectioning Scope Specific Elements
- Selector
 header- Example
 - 
          
I am a headerelement.headerelement stand-alone - Selector
 footer- Example
 - 
          
footerelement stand-alone - Selector
 address- Example
 - 
          
I am an addresselement.addresselement stand-alone 
Grouping Content
        Generic block
        
          - Selector
 
          div 
          - Example
 
          - 
            
              I am a div element.
              div element stand-alone 
             
           
        
        Paragraph
        
          - Selector
 
          p 
          - Examples
 
          - 
            
              I am a p element.
              p element stand-alone 
             
            
              
              
              
              
              Several p elements 
             
           
        
        Thematic break
        
          - Selector
 
          hr 
          - Examples
 
          - 
            
              
              hr element stand-alone 
             
            
              
              
              
              hr element with surounding content 
             
           
        
        Lists
        
          - Selectors
 
          ul 
          ul > li 
          - Example
 
          - 
            
              
                - I am a
                  list item
                  in an unordered list.
                
 
                - I am a list item, too.
 
                - I am a third list.
                  
                    - I am a nested list item.
 
                    - I am a nested list item, too.
 
                    - I am a third nested list item.
                      
                        - I am a nested list item.
 
                        - I am a nested list item, too.
 
                        - I am a third nested list item.
 
                      
                     
                  
                 
                - I am yet another list item.
 
              
              ul element with li and a 
             
           
          - Selectors
 
          ol 
          ol > li 
          - Example
 
          - 
            
              
                - I am a list item in an ordered list.
 
                - I am a list item, too.
 
                - I am a third list .
                  
                    - I am a nested list item.
 
                    - I am a nested list item, too.
 
                    - I am a third nested list item.
                      
                        - I am a nested list item.
 
                        - I am a nested list item, too.
 
                        - I am a third nested list item.
 
                      
                     
                  
                 
                - I am yet another list item.
 
              
              ol element with li and a 
             
           
          - Selectors
 
          menu 
          menu > li 
          menu > li > a 
          - Example
 
          - 
            
              
              menu element with li and a 
             
           
        
        Definition list
        
          - Selectors
 
          dl 
          dl > dt 
          dl > dd 
          - Example
 
          - 
            
              
                - I am a 
dt element. 
                - I am a 
dd element. 
                - I am another 
dt element. 
                - I am another 
dd element. 
              
              dl element with dts and dds 
             
           
        
        Extended quotation
        
          - Selector
 
          blockquote 
          - Examples
 
          - 
            
              I am a blockquote element.
              
              blockquote element stand-alone 
             
            
              
                
              
              
              blockquote.var-alternate element stand-alone 
             
            
              
              
                
                
                
              
              
              Nesting blockquote elements 
             
            
              
                I am a blockquote element.
                
              
              — I am a cite element inside a p element.
              blockquote with cite in an adjacent p 
             
            
              
                
                  Always build on solid ground!
                
                — Old wisdom 
               
              blockquote inside figure, followed by figcaption 
             
           
        
        Self-contained figure
        
          - Selectors
 
          figure 
          figure > figcaption 
          - Examples
 
          - 
            
              
                I am a figure element.
                I am a figcaption element. 
               
              figure element with figcaption 
             
            
              
                
                  Always build on solid ground!
                
                — Old wisdom 
               
              figure.var-feature with blockquote 
             
           
        
        Preformatted text
        
          - Selector
 
          pre 
          - Examples
 
          - 
            
              I am a pre element.
              pre element stand-alone 
             
            
              
        PPP   RRR   EEEE
        P  P  R  R  E
        PPP   RRR   EEE
        P     R R   E
        P     R  R  EEEE
            
              pre element with preformatted content 
             
           
        
        Text-level Semantics
        Generic range
        
          - Selector
 
          span 
          - Example
 
          - 
            
              I am a span element.
              span element stand-alone 
             
           
        
        Line Breaks
        
          - Selector
 
          br 
          - Example
 
          - 
            
              I am
broken by a br element.
              Text broken by br element 
             
           
          - Selector
 
          wbr 
          - Example
 
          - 
            
              
                Here’s a very long German word:
                Donaudampfschifffahrtsgesellschaftskapitänsmützen   .
                It may wrap at certain places indicated by wbr elements.
              
              Text broken by wbr element 
             
           
        
        Emphasis
        
          - Selector
 
          em 
          - Example
 
          - 
            
              I am an em element.
              em element stand-alone 
             
           
          - Selector
 
          strong 
          - Example
 
          - 
            
              I am a strong element.
              strong element stand-alone 
             
           
        
        Terminology
        
          - Selector
 
          abbr 
          - Example
 
          - 
            
              I am an abbr element.
              abbr element stand-alone 
             
           
          - Selector
 
          dfn 
          - Example
 
          - 
            
              I am a dfn element.
              dfn element stand-alone 
             
           
          - Selector
 
          var 
          - Example
 
          - 
            
              I am a var element.
              var element stand-alone 
             
           
        
        Inline Quotation
        
          - Selector
 
          q 
          - Example
 
          - 
            
              I am a q element.
              q element stand-alone 
             
           
        
        Citation
        
          - Selector
 
          cite 
          - Example
 
          - 
            
              I am a cite element.
              cite element stand-alone 
             
           
        
        Altered Baseline
        
          - Selector
 
          sub 
          - Example
 
          - 
            
              I am a sub element.
              sub element stand-alone 
             
           
          - Selector
 
          sup 
          - Example
 
          - 
            
              I am a sup element.
              sup element stand-alone 
             
           
        
        Input/Output
        
          - Selector
 
          kbd 
          - Example
 
          - 
            
              I am a kbd element.
              kbd element stand-alone 
             
           
          - Selector
 
          samp 
          - Example
 
          - 
            
              I am a samp element.
              samp element stand-alone 
             
           
        
        Inline Code
        
          - Selector
 
          code 
          - Example
 
          - 
            
              I am a code element.
              code element stand-alone 
             
           
        
        Data
        
          - Selector
 
          data 
          - Example
 
          - 
            
              I am a data element.
              data element stand-alone 
             
           
          - Selector
 
          time 
          - Example
 
          - 
            
              
              time element stand-alone 
             
           
        
        Enhanced Semantics
        
          - Selector
 
          b 
          - Example
 
          - 
            
              I am a b element.
              b element stand-alone 
             
           
          - Selector
 
          i 
          - Example
 
          - 
            
              I am an i element.
              i element stand-alone 
             
           
          - Selector
 
          u 
          - Example
 
          - 
            
              I am a u element.
              u element stand-alone 
             
           
          - Selector
 
          s 
          - Example
 
          - 
            
              I am a s element.
              s element stand-alone 
             
           
          - Selector
 
          small 
          - Example
 
          - 
            
              I am a small element.
              small element stand-alone 
             
           
          - Selector
 
          mark 
          - Example
 
          - 
            
              I am a mark element.
              mark element stand-alone 
             
           
        
        Directionality
        
          - Selector
 
          bdi 
          - Example
 
          - 
            
              אני אלמנט bdi.
              bdi element stand-alone 
             
           
          - Selector
 
          bdo 
          - Example
 
          - 
            
              I am a bdo element.
              bdo element stand-alone 
             
           
        
        Ruby
        
          - Selectors
 
          ruby 
          ruby > rt 
          ruby > rp 
          - Example
 
          - 
            
              漢
                
                字
                
                
              
              ruby element with rt wrapped in rp 
             
           
        
    
divI am a 
              div element.div element stand-alonepI am a p element.
p element stand-alonep elementshrhr element stand-alonehr element with surounding contentulul > li- I am a list item in an unordered list.
 - I am a list item, too.
 - I am a third list.
                  
- I am a nested list item.
 - I am a nested list item, too.
 - I am a third nested list item.
                      
- I am a nested list item.
 - I am a nested list item, too.
 - I am a third nested list item.
 
 
 - I am yet another list item.
 
ul element with li and aolol > li- I am a list item in an ordered list.
 - I am a list item, too.
 - I am a third list .
                  
- I am a nested list item.
 - I am a nested list item, too.
 - I am a third nested list item.
                      
- I am a nested list item.
 - I am a nested list item, too.
 - I am a third nested list item.
 
 
 - I am yet another list item.
 
ol element with li and amenumenu > limenu > li > amenu element with li and adldl > dtdl > dd- I am a 
dtelement. - I am a 
ddelement. - I am another 
dtelement. - I am another 
ddelement. 
dl element with dts and ddsblockquoteI am a blockquote element.
              
              blockquote element stand-aloneblockquote.var-alternate element stand-aloneblockquote elementsI am a
blockquoteelement.
— I am a cite element inside a p element.
blockquote with cite in an adjacent pAlways build on solid ground!
blockquote inside figure, followed by figcaptionfigurefigure > figcaptionfigure element.
                figcaption element.figure element with figcaptionAlways build on solid ground!
figure.var-feature with blockquotepreI am a pre element.
              pre element stand-alone
        PPP   RRR   EEEE
        P  P  R  R  E
        PPP   RRR   EEE
        P     R R   E
        P     R  R  EEEE
            
              pre element with preformatted contentspanspan element.
              span element stand-alonebrbroken by a
br element.
              br elementwbr
                Here’s a very long German word:
                Donauwbr elements.
              
wbr elementemem element.
              em element stand-alonestrongstrong element.
              strong element stand-aloneabbrabbr element.
              abbr element stand-alonedfndfn element.
              dfn element stand-alonevarvar element.
              var element stand-aloneqI am a q element.
              q element stand-alonecitecite element.
              cite element stand-alonesubsub element.
              sub element stand-alonesupsup element.
              sup element stand-alonekbdkbd element.
              kbd element stand-alonesampsamp element.
              samp element stand-alonecodeI am a code element.
              code element stand-alonedatadata element.
              data element stand-alonetimetime element stand-alonebb element.
              b element stand-aloneii element.
              i element stand-aloneuu element.
              u element stand-aloness element.s element stand-alonesmallsmall element.
              small element stand-alonemarkmark element.
              mark element stand-alonebdibdi.
              bdi element stand-alonebdobdo element.
              bdo element stand-alonerubyruby > rtruby > rpruby element with rt wrapped in rpEdits
- Selector
 del- Example
 - 
          
I am adelelement.delelement stand-alone - Selector
 ins- Example
 - 
          
I am an inselement.inselement stand-alone 
Links
- Selectors
 a:any-linka:any-link:hover- Example
 - 
          
I am an a(link) element.aelement withhrefattribute stand-alone - Selector
 a[id]- Example
 - 
          
I am an a(anchor) element.aelement withidattribute stand-alone 
Embedding
Multimedia Content
View incomplete examples for
          picture,
          source,
          img,
          video,
          audio,
          track,
          map, and
          area.
        
        - Selector
 picture- Example
 - 
            
I am a pictureelement.pictureelement stand-alone - Selector
 source- Example
 - 
            
I am a sourceelement.sourceelement stand-alone - Selector
 img- Example
 - 
            
I am an
imgelement.imgelement stand-alone - Selector
 video- Example
 - 
            
videoelement stand-alone - Selector
 audio- Example
 - 
            
audioelement stand-alone - Selector
 track- Example
 - 
            
trackelement stand-alone - Selector
 map- Example
 - 
            
mapelement stand-alone - Selector
 area- Example
 - 
            
I am an areaelement.areaelement stand-alone 
Embedding Containers
View incomplete examples for
          embed,
          iframe,
          object, and
          portal.
        
        - Selector
 embed- Example
 - 
            
embedelement stand-alone - Selector
 iframe- Example
 - 
            
iframeelement stand-alone - Selector
 object- Example
 - 
            
objectelement stand-alone - Selector
 portal- Example
 - 
            
I am a portalelement.portalelement stand-alone 
Embedded Fragments of Other Markup Languages
View incomplete examples for
          svg and math.
        
        - Selector
 svg- Example
 - 
            
svgelement stand-alone - Selector
 math- Example
 - 
            
mathelement stand-alone 
Tabular Content
- Selectors
 tablecaptiontheadtbodytfoottrtdthcolcolgroup- Examples
 - 
          
A B aaa bbb 123 456 Y Z a simple tableStandard Table
What MDN says about table mark-up Element Description <caption>The <caption>HTML element specifies the caption (or title) of a table.<col>The <col>HTML element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within acolgroupelement.<colgroup>The <colgroup>HTML element defines a group of columns within a table.<table>The <table>HTML element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.<tbody>The <tbody>HTML element encapsulates a set of table rows (trelements), indicating that they comprise the body of the table (table).<td>The <td>HTML element defines a cell of a table that contains data. It participates in the table model.<tfoot>The <tfoot>HTML element defines a set of rows summarizing the columns of the table.<th>The <th>HTML element defines a cell as header of a group of table cells. The exact nature of this group is defined by thescopeandheadersattributes.<thead>The <thead>HTML element defines a set of rows defining the head of the columns of the table.<tr>The <tr>HTML element defines a row of cells in a table. The row's cells can then be established using a mix oftd(data cell) andth(header cell) elements.a tableabout table mark-up 
Form-associated Content
View incomplete examples for
          form,
          button,
          label,
          fieldset,
          legend,
          datalist,
          option,
          optgroup,
          input,
          textarea,
          select,
          meter,
          output, and
          progress.
        
        General
- Selector
 form- Example
 - 
            
formelement stand-alone - Selector
 button- Example
 - 
            
buttonelement stand-alone 
Labeling & Grouping
- Selector
 label- Example
 - 
            
labelelement stand-alone - Selector
 fieldset- Example
 - 
            
fieldsetelement stand-alone - Selector
 legend- Example
 - 
            
legendelement stand-alone 
Value Lists
- Selector
 datalist- Example
 - 
            
datalistelement stand-alone - Selector
 option- Example
 - 
            
optionelement stand-alone - Selector
 optgroup- Example
 - 
            
optgroupelement stand-alone 
Inputs
- Selector
 input- Example
 - 
            
I am an inputelement.inputelement stand-alone - Selector
 textarea- Example
 - 
            
textareaelement stand-alone - Selector
 select- Example
 - 
            
selectelement stand-alone 
Outputs
- Selector
 meter- Example
 - 
            
I am a meterelement.meterelement stand-alone - Selector
 output- Example
 - 
            
outputelement stand-alone - Selector
 progress- Example
 - 
            
progresselement stand-alone 
Interactive Elements
- Selectors
 detailssummary- Example
 - 
          
I am a
summaryelement.I am a
detailselement.detailselement withsummaryelement - Selector
 dialog- Example
 - 
          
a simple dialog 
Scripting
View incomplete examples for
          script,
          noscript, and
          canvas.
        
        - Selector
 script- Example
 - Nothing to see.
 - Selector
 noscript- Example
 - Selector
 canvas- Example
 - 
            
canvaselement stand-alone