pre (HTML4 & HTML5)

Specifies that the enclosed text is preformatted and that whitespace should be preserved appropriately.

Properties & Events

KeyDescriptionAvailability
classCSS class assigned to the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
dirDirection of the element text.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
disabledSpecifies whether or not the element is disabled.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
idUnique identifier for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
langLanguage code for the content of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
languageScript language for the element.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera ??
styleInline style for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
tabindexPosition of the element in the tabbing order for the document.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
titleShort text description for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
widthWidth of the element (pixels or percentage).
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
onblurFires when the element loses focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onclickFires when the element is clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
ondblclickFires when the element is double-clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onfocusFires when the element receives focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeydownFires when a user presses down on a key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeypressFires when a user presses a key or holds down the key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeyupFires when a user releases a key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmousedownFires when a user clicks down on the mouse button while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmousemoveFires when the mouse moves while the pointer over the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseoutFires when the mouse pointer moves off of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseoverFires when the mouse pointer moves over the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseupFires when the user releases the mouse button while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0

Examples having uses of: 'pre'

1 votes
7k views

JavaScript For

Javascripts loops are similar to other programming languages. Loops allows us to execute a block of statements to the specified number of times.
1 votes
2k views

CSS Syntax

CSS syntax is as selector{property:value;}. Here selector is the element on which we want to apply the CSS. Property may be height , width ,color etc. The value may be in percent , numbers or letters.
0 votes
1k views

CSS enabled & disabled

These are used to apply the properties on the elements that are either enable or disable.