HtmlTag::$voidElements

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/Element/HtmlTag.php \Drupal\Core\Render\Element\HtmlTag::voidElements
  2. 8.9.x core/lib/Drupal/Core/Render/Element/HtmlTag.php \Drupal\Core\Render\Element\HtmlTag::voidElements
  3. 10 core/lib/Drupal/Core/Render/Element/HtmlTag.php \Drupal\Core\Render\Element\HtmlTag::voidElements

Void elements do not contain values or closing tags.

Type: voidElements

See also

http://www.w3.org/TR/html5/syntax.html#syntax-start-tag

http://www.w3.org/TR/html5/syntax.html#void-elements

File

core/lib/Drupal/Core/Render/Element/HtmlTag.php, line 41

Class

HtmlTag
Provides a render element for any HTML tag, with properties and value.

Namespace

Drupal\Core\Render\Element

Code

protected static $voidElements = [
    'area',
    'base',
    'br',
    'col',
    'embed',
    'hr',
    'img',
    'input',
    'keygen',
    'link',
    'meta',
    'param',
    'source',
    'track',
    'wbr',
    'rect',
    'circle',
    'polygon',
    'ellipse',
    'stop',
    'use',
    'path',
];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.