Version-//W3C//DTD HTML 4.01//EN
ElementPRE
Purposepreformatted text
DescriptionThis element brackets text which should be rendered exactly as it appears, that is without "eating up" the white space. This is used, for example, to enclose program code or tables where the indentation is important.
Start tagRequired <PRE>
Attributes
NameTypeDefaultComment
class CDATA #IMPLIEDspace-separated list of classes
dir( ltr | rtl )#IMPLIEDdirection for weak/neutral text
idID #IMPLIEDdocument-wide unique id
lang NAME #IMPLIEDlanguage code as RFC1766; language code
onclick CDATA #IMPLIEDscript expression; a pointer button was clicked
ondblclick CDATA #IMPLIEDscript expression; a pointer button was double clicked
onkeydown CDATA #IMPLIEDscript expression; a key was pressed down
onkeypress CDATA #IMPLIEDscript expression; a key was pressed and released
onkeyup CDATA #IMPLIEDscript expression; a key was released
onmousedown CDATA #IMPLIEDscript expression; a pointer button was pressed down
onmousemove CDATA #IMPLIEDscript expression; a pointer was moved within
onmouseout CDATA #IMPLIEDscript expression; a pointer was moved away
onmouseover CDATA #IMPLIEDscript expression; a pointer was moved onto
onmouseup CDATA #IMPLIEDscript expression; a pointer button was released
style CDATA #IMPLIEDstyle sheet data; associated style info
title CDATA #IMPLIEDtext; advisory title
Content( #PCDATA | TT | I | B | BIG | SMALL | EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM | A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO | INPUT | SELECT | TEXTAREA | LABEL | BUTTON )* -( IMG | OBJECT | BIG | SMALL | SUB | SUP )
End tagRequired </PRE>
Referenced in BLOCKQUOTE BODY BUTTON DD DEL DIV FIELDSET FORM INS LI MAP NOSCRIPT OBJECT TD TH
Example
SourceAppearance
<PRE> 

import java.awt.Graphics;
public class HelloWorld
extends java.applet.Applet {
public void init() {
resize(
200, 200
);
}
public void
paint(Graphics context) {
context.drawString(
"Hello, world!", 10, 50
);
}
}
</PRE>
 
import java.awt.Graphics;
public class HelloWorld 
 extends java.applet.Applet {
 public void init() {
  resize(
   200, 200
  );
 }
 public void 
  paint(Graphics context) {
  context.drawString(
   "Hello, world!", 10, 50
  );
 }
}
search Search · star Market
2023-06-19 · John December · Terms © johndecember.com