Skip to content

Commit

Permalink
chore: make the style consistent with other documents (mdn#32977)
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 authored Apr 6, 2024
1 parent ac96ce0 commit 674ac8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions files/en-us/web/api/element/setattribute/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ browser-compat: api.Element.setAttribute

{{APIRef("DOM")}}

Sets the value of an attribute on the specified element. If
the attribute already exists, the value is updated; otherwise a new attribute is added
with the specified name and value.
The **`setAttribute()`** method of the {{domxref("Element")}} interface sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute is added with the specified name and value.

To get the current value of an attribute, use {{domxref("Element.getAttribute", "getAttribute()")}}; to remove an attribute, call {{domxref("Element.removeAttribute", "removeAttribute()")}}.

Expand Down

0 comments on commit 674ac8f

Please sign in to comment.