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

Breadcrumb

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

function Elements::isElement

Is an element name valid in an html5 document. This includes html5 elements along with other allowed embedded content such as svg and mathml.

Parameters

string $name The name of the element.:

Return value

bool true if valid and false otherwise.

File

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

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 function isElement($name) {
    return static::isHtml5Element($name) || static::isMathMLElement($name) || static::isSvgElement($name);
}

API Navigation

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