Home > Web Front-end > HTML Tutorial > Detailed explanation of the use of tag in html in web pages

Detailed explanation of the use of tag in html in web pages
黄舟
Release: 2017-06-19 14:59:53
Original
2998 people have browsed it

Although w3c does not recommend the use of applets, using applets to deploy applets in the intranet is a recommended common practice, so let's first discuss the use of the tag.

Usage of

It is a very common practice to use the tag for early deployment of applet. All attributes of the applet tag The list, which you can find here , is explained in detail.

1. Here is an example of using an applet:

<applet code=Applet1.class width="200" height="200">
Your browser does not support the <code>applet</code> tag.
</applet>
Copy after login

Generally we mainly use these attributes:

The code attribute refers to the applet class, that is Inherit With subclasses of Java.applet.Applet or java.swing.JApplet class, this attribute value must be the path to store the applet class for you;

width attribute refers to your The width that the applet will occupy in the browser

The height attribute refers to the height that your applet will occupy in the browser

2. Generally we use these attributes, but Sometimes we package the applet into a jar file, then we have to use the archive attribute, for example:

<applet code=package.Applet1.class archive="app.jar" width="200" height="200">
Your browser does not support the <code>applet</code> tag.
</applet>
Copy after login

The meaning of this example is that it is in the app.jar file in the file where you store the html file Find the applet class package.Applet1.class. If you want to use multiple jar files, separate the jar files with English-encoded commas in the archive attribute value.

The tag in html5 is used to embed Java applet. Here is a detailed introduction to the usage of tag, tag attributes and application examples of tag.

The function of tag in html: embed Java applet

tag usage:

The tag is not supported in HTML5. Please use the object element tag instead.

The element is deprecated in HTML 4.01. The

tag defines the embedded applet.

Which browsers support the tag?

Some support for the tag still exists in some browsers, but it requires additional plug-ins and an installation process to work.

Here, in order to better let you understand how to add Java Applet to your HTML code, I will give you an example.

The following is the dynamic effect achieved using Java Applet.

< >

All you have to do is add the following code to your HTML file.

<applet code="alcsnow.class" align="baseline" width="457" height="328">
<param name="grph" value="tree.gif"> 
<param name="snows" value="900" >
<param name="threadsleep" value="50"> 
<请把浏览器配置成支持Java。> 
</applet>
Copy after login

The above is the detailed content of Detailed explanation of the use of tag in html in web pages. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template