• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
  1. MDN
  2. Tecnologia da Web para desenvolvedores
  3. Web APIs
  4. HTMLTableElement
  5. HTMLTableElement.createTHead()

HTMLTableElement.createTHead()

In This Article
  1. Syntax
  2. Example
  3. Specification

The HTMLTableElement.createTHead()method returns the <thead> element association with the table, of type HTMLTableSectionElement. If there is no such element associated to the thable, this method creates it, then returns it.

Syntax

HTMLElementObject = table.createTHead()

Example

myhead = mytable.createTHead(); 
//checking: myhead == mytable.tHead

Specification

  • createTHead

Document Tags and Contributors

Tags: 
  • API
  • HTML DOM
  • HTMLTableElement
  • Method
  • NeedsBrowserCompatibility
  • NeedsSpecTable
  • Reference
  • Référence
 Contributors to this page: teoli, kscarfone, Sheppy, ethertank, RobG, Dria, JesseW
 Last updated by: teoli, Mar 24, 2014, 1:34:45 AM
See also
  1. HTMLTableElement
  2. Properties
    1. HTMLTableElement.align
    2. HTMLTableElement.bgColor
    3. HTMLTableElement.border
    4. HTMLTableElement.caption
    5. HTMLTableElement.cellPadding
    6. HTMLTableElement.cellSpacing
    7. HTMLTableElement.frame
    8. HTMLTableElement.rows
    9. HTMLTableElement.rules
    10. HTMLTableElement.summary
    11. HTMLTableElement.tBodies
    12. HTMLTableElement.tFoot
    13. HTMLTableElement.tHead
    14. HTMLTableElement.width
  3. Methods
    1. HTMLTableElement.createCaption()
    2. HTMLTableElement.createTFoot()
    3. HTMLTableElement.createTHead()
    4. HTMLTableElement.deleteRow()
    5. HTMLTableElement.deleteTFoot()
    6. HTMLTableElement.deleteTHead()
    7. HTMLTableElement.insertRow()
  4. Inheritance:
    1. HTMLElement
    2. Element
    3. Node
    4. EventTarget