HTML DOM Pre Object

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





googletag.cmd.push(function() googletag.display('div-gpt-ad-1422003450156-2'); );



HTML DOM Pre Object



❮ Previous
Next ❯


Pre Object


The Pre object represents an HTML <pre> element.


Access a Pre Object


You can access a <pre> element by using getElementById():



Example



var x = document.getElementById("myPre");

Try it Yourself »

Create a Pre Object


You can create a <pre> element by using the document.createElement() method:



Example



var x = document.createElement("PRE");

Try it Yourself »

Pre Object Properties






Property Description
width
Not supported in HTML5. Use
style.width instead.


Sets or returns the value of the width attribute of the preformatted text

Standard Properties and Events


The Pre object also supports the standard properties and events.



Related Pages


HTML Tutorial: HTML Text Formatting


HTML Reference: HTML <pre> tag





❮ Previous
Next ❯

Popular posts from this blog

California

New York City

CNN