VersionW3C//DTD HTML 3.2 Final//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
width NUMBER #impliedis this widely supported?
Content( #PCDATA | TT | I | B | U | STRIKE | BIG | SMALL | SUB | SUP | EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | A | IMG | APPLET | FONT | BASEFONT | BR | SCRIPT | MAP | INPUT | SELECT | TEXTAREA )* -( IMG | BIG | SMALL | SUB | SUP | FONT )
End tagRequired </PRE>
Referenced in BLOCKQUOTE BODY CENTER DD DIR DIV FORM LI MENU 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