English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML reference manual

HTML tag大全

Etiqueta <applet> de HTML

The Applet element in HTML ( <applet>) indicates that it contains Java applets. This element in HTML5have been deprecated and can no longer be used. Web developers should use more general elements.

Online examples

An embedded Java applet:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Basic Tutorial Website(w3(codebox.com)</title> 
</head>
<body>
<applet code="Bubbles.class" width="350" height="350">
Java applet that draws animated bubbles.
</applet>
</body>
</html>

Browser compatibility

IEFirefoxOperaChromeSafari

Note:Some browsers still have support for <applet>, but they require additional plugins and installation processes to work.

tag definition and usage instructions

HTML5 The <applet> tag is not supported. Please use <object> or <embed> tag replaces it.

En HTML 4.01 In it, the <applet> element is deprecated.

The <applet> tag defines an embedded applet.

HTML 4.01 and HTML5differences between

HTML5 The <applet> tag is not supported in HTML. 4.01 The <applet> tag is deprecated.

Required attribute

AtributoValorDescripción
codeURLSpecifies the filename of the Java applet.
objectnameSpecifies the resource name of a series of versions containing the applet.

Optional attribute

AtributoValorDescripción
alignleft
right
top
bottom
middle
baseline
Define the alignment method of applet relative to the surrounding elements.
alttextEstablece el texto de reemplazo del applet.
archiveURLEstablece la ubicación del archivo.
codebaseURLEstablece la URL base del applet especificada en el atributo code.
heightpixelsEstablece la altura del applet.
hspacepixelsDefine el espacio horizontal alrededor del applet.
namenameDefine el nombre del applet (usado en scripts).
vspacepixelsDefine el espacio vertical alrededor del applet.
widthpixelsEstablece el ancho del applet.

Atributos estándar

En HTML 4.01 En, la etiqueta <applet> admite los siguientes atributos estándar:

AtributoValorDescripción
classclassnameEstablece el nombre de la clase del elemento
ididEstablece el id único del elemento
stylestyle_definitionEstablece el estilo en línea del elemento
titletextEstablece información adicional del elemento

Para una descripción completa, visiteAtributos estándar.

Atributos de eventos

En HTML 4.01 donde, la etiqueta <applet> no admite ningún atributo de evento.

Para una descripción completa, visiteAtributos de eventos.