# removeAttribute method

The `removeAttribute` method removes the given attribute from some tag.

## Syntax

`element.removeAttribute(attribute name);`

## Example

Let's remove the `value` attribute from an element:

`<input id="elem" value="abcde">` `let elem = document.querySelector('#elem'); elem.removeAttribute('value');`

The HTML code will look like this (the value attribute will disappear):

`<input id="elem">`

## See also

- the `getAttribute` method
  that gets attributes
- the `setAttribute` method
  that sets attributes
- the `hasAttribute` method
  that checks attributes

← →
↑
en ru