Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Elements.php

Elements::$optionalEndElementsParentsToClose

Elements with optional end tags that cause auto-closing of previous and parent tags, as example most of the table related tags, see https://www.w3.org/TR/html401/struct/tables.html Structure is as follows: TAG-NAME => [PARENT-TAG-NAME-TO-CLOSE1, PARENT-TAG-NAME-TO-CLOSE2, ...].

Order is important, after auto-closing one parent with might have to close also their parent.

Type: array

File

vendor/masterminds/html5/src/HTML5/Elements.php, line 84

Class

Elements
This class provides general information about HTML5 elements, including syntactic and semantic issues. Parsers and serializers can use this class as a reference point for information about the rules of various HTML5 elements.

Namespace

Masterminds\HTML5

Code

public static $optionalEndElementsParentsToClose = array(
    'tr' => array(
        'td',
        'tr',
    ),
    'td' => array(
        'td',
        'th',
    ),
    'th' => array(
        'td',
        'th',
    ),
    'tfoot' => array(
        'td',
        'th',
        'tr',
        'tbody',
        'thead',
    ),
    'tbody' => array(
        'td',
        'th',
        'tr',
        'thead',
    ),
);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal