The HTML <object> align Attribute is used to specify an alignment for an object Element. It is an inline element means that can not insert a new line on a page. The text and other elements can also wrap around it.
Note: This attribute is not supported by HTML5.
Syntax:
<object align="left | right | middle | top | bottom">
Attribute Values:
- left: It sets the object to the left-align.
- right: It sets the object to the right-align.
- middle: It sets the object to the middle.
- top: It sets the object to the top-align.
- Bottom: It sets the object to the bottom align.
Example:
html
<!DOCTYPE html>
< html >
< head >
< title >
HTML object align Attribute
</ title >
</ head >
< body style = "text-align:center;" >
< h2 >HTML object align Attribute</ h2 >
< object id = "myobject"
width = "200"
height = "100"
align = "left"
data =
</ object >
< object id = "myobject"
width = "200"
height = "100"
align = "right"
data =
</ object >
< object id = "myobject"
width = "200"
height = "100"
align = "middle"
data =
</ object >
< object id = "myobject"
width = "200"
height = "100"
align = "top"
data =
</ object >
</ body >
</ html >
|
Output:

Supported Browsers: The browser supported by HTML object align attribute are listed below:
- Google Chrome 10.0
- Internet Explorer 10.0
- Firefox 4.0
- Opera 10.6
- Apple Safari
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
22 Feb, 2022
Like Article
Save Article