Skip to content
Related Articles

Related Articles

Improve Article

HTML | applet width Attribute

  • Last Updated : 22 Apr, 2020

The HTML applet width attribute is used to specify the width of an <applet> element.

Syntax:

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

<applet width="pixels">

Attribute Values:
pixels: It contains the pixels value that specifies the width of the applet element.

Example:






<!DOCTYPE html>
<html>
      
<head>
    <title>
        HTML | applet width attribute
    </title>
</head>
  
<body>
    <applet code="HelloWorld" 
        width=200 height=60>
    </applet>
      
    <h2>
        Hello GeeksForGeeks
    </h2>
</body>
  
</html>

Output:

In the above example, the applet file HelloWorld can use the variable named message to access the value stored in it, which is “HelloWorld”.

Supported Browsers: The browser supported by <applet> width attribute are listed below:

  • Firefox
  • Safari
My Personal Notes arrow_drop_up
Recommended Articles
Page :