---
title: HTMLPreElement
slug: Web/API/HTMLPreElement
tags:
  - API
  - HTML DOM
  - Interface
  - Reference
browser-compat: api.HTMLPreElement
---
{{APIRef("HTML DOM")}}

The **`HTMLPreElement`** interface exposes specific properties and methods (beyond those of the {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating a block of preformatted text ({{HtmlElement("pre")}}).

{{InheritanceDiagram}}

## Properties

_Inherits properties from its parent, {{domxref("HTMLElement")}}._

- {{domxref("HTMLPreElement.width")}} {{deprecated_inline}}
  - : Is a `long` value reflecting the obsolete {{htmlattrxref("width", "pre")}} attribute, containing a fixed-size length for the {{HTMLElement("pre")}} element.

## Methods

_No specific method; inherits properties from its parent, {{domxref("HTMLElement")}}._

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- The HTML element implementing this interface: {{HTMLElement("pre")}}
