Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<DOMElement::removeDOMElement::removeAttributeNode>
^DOMElementLast updated: Mon, 26 Oct 2026

DOMElement::removeAttribute

(PHP 5, PHP 7, PHP 8)

DOMElement::removeAttribute — Removes attribute

Description

public function DOMElement::removeAttribute(string $qualifiedName): bool

Removes attribute named qualifiedName from the element.

Parameters

qualifiedName

The name of the attribute.

Return Values

Returns true on success or false on failure.

Errors/Exceptions

May throw a DOMException with the following error codes:

DOM_NO_MODIFICATION_ALLOWED_ERR

Raised if the node is readonly.

See Also


<DOMElement::removeDOMElement::removeAttributeNode>
^DOMElementLast updated: Mon, 26 Oct 2026