diff --git a/docs/create-modify-element.mdx b/docs/create-modify-element.mdx index 9c060ca..8ccb1ed 100644 --- a/docs/create-modify-element.mdx +++ b/docs/create-modify-element.mdx @@ -92,10 +92,12 @@ document.createElement("div") ### 2. `setAttribute()` -Every element has a `.setAttribute(name, value)` method, which can add/modify a attribute on the current element. +Every element has a `setAttribute` method - which sets a attribute on the current element. -`name` - the attribute name which should be added. Ex- `"type"`. -`value` - value of the attribute. Ex- `"text"`. +`setAttribute(name, value)` + +`name` - name of the attribute to add. Ex- "type". +`value` - value of the attribute. Ex- "text". ```js var ele = document.createElement("input")