diff --git a/files/en-us/web/api/htmlfieldsetelement/type/index.md b/files/en-us/web/api/htmlfieldsetelement/type/index.md new file mode 100644 index 000000000000000..9c5a3dc5a82b74c --- /dev/null +++ b/files/en-us/web/api/htmlfieldsetelement/type/index.md @@ -0,0 +1,35 @@ +--- +title: "HTMLFieldSetElement: type property" +short-title: type +slug: Web/API/HTMLFieldSetElement/type +page-type: web-api-instance-property +browser-compat: api.HTMLFieldSetElement.type +--- + +{{ApiRef("HTML DOM")}} + +The **`type`** read-only property of the {{domxref("HTMLFieldSetElement")}} interface returns the string `"fieldset"`. + +## Value + +The string `"fieldset"`. + +## Example + +```js +const fs = document.querySelector("fieldset"); +console.log(fs.type); // "fieldset" +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("HTMLFieldSetElement")}} +- {{HTMLElement("fieldset")}} diff --git a/files/en-us/web/api/htmloutputelement/type/index.md b/files/en-us/web/api/htmloutputelement/type/index.md new file mode 100644 index 000000000000000..381676c8a803b64 --- /dev/null +++ b/files/en-us/web/api/htmloutputelement/type/index.md @@ -0,0 +1,35 @@ +--- +title: "HTMLOutputElement: type property" +short-title: type +slug: Web/API/HTMLOutputElement/type +page-type: web-api-instance-property +browser-compat: api.HTMLOutputElement.type +--- + +{{ApiRef("HTML DOM")}} + +The **`type`** read-only property of the {{domxref("HTMLOutputElement")}} interface returns the string `"output"`. + +## Value + +The string `"output"`. + +## Example + +```js +const output = document.querySelector("output"); +console.log(output.type); // "output" +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("HTMLOutputElement")}} +- {{HTMLElement("output")}} diff --git a/files/en-us/web/api/htmltextareaelement/type/index.md b/files/en-us/web/api/htmltextareaelement/type/index.md index 2888e932370f0c8..43fa4c2af40dc5b 100644 --- a/files/en-us/web/api/htmltextareaelement/type/index.md +++ b/files/en-us/web/api/htmltextareaelement/type/index.md @@ -8,25 +8,17 @@ browser-compat: api.HTMLTextAreaElement.type {{ApiRef("HTML DOM")}} -The read-only **`type`** property of the {{domxref("HTMLTextAreaElement")}} always returns `textarea`. +The **`type`** read-only property of the {{domxref("HTMLTextAreaElement")}} interface returns the string `"textarea"`. ## Value -A string whose value is always `textarea`. +The string `"textarea"`. ## Example -### HTML - -```html - -``` - -### JavaScript - ```js -const txtAreaElement = document.querySelector("#txtarea"); -console.log(txtAreaElement.type); // Output: "textarea" +const textArea = document.querySelector("textarea"); +console.log(textArea.type); // "textarea" ``` ## Specifications @@ -39,4 +31,5 @@ console.log(txtAreaElement.type); // Output: "textarea" ## See also -- {{domxref("HTMLInputElement.type")}} property +- {{domxref("HTMLTextAreaElement")}} +- {{HTMLElement("textarea")}}