YouTip LogoYouTip

Att A Shape

# HTML `` shape Attribute The `shape` attribute of the HTML `` (anchor) tag was used to define the shape of a clickable region within an image map. When paired with the `coords` attribute, it allowed developers to create interactive, hyperlinked hotspots on an image or object. --- ## Deprecation Notice > ⚠️ **Important:** The `shape` attribute for the `` tag is **deprecated and obsolete in HTML5**. Modern web browsers have dropped or limited support for this attribute. To create cross-browser compatible image maps in modern web development, you should use the `` and `` elements instead. --- ## Definition and Usage The `shape` attribute, in conjunction with the `coords` attribute, specifies the size, shape, and position of a hyperlink inside an `` or `` element. By defining shapes (such as rectangles, circles, or polygons) and their corresponding pixel coordinates, you can turn specific parts of an image into clickable links. --- ## Syntax ```html ``` ### Attribute Values | Value | Description | | :--- | :--- | | `default` | Specifies the entire region of the image/object. | | `rect` | Defines a rectangular region. | | `circle` | Defines a circular region. | | `poly` | Defines a polygonal region (a shape with multiple straight sides). | --- ## Code Example The following example demonstrates how the `shape` and `coords` attributes were historically used inside an `` element to create an interactive solar system map: ```html Sun Mercury Venus ``` --- ## Browser Support Historically, native support for the `shape` attribute on `` tags was highly inconsistent: * **Supported by:** Older versions of Firefox and Opera. * **Not supported by:** Internet Explorer, Google Chrome, and Safari. Because of this poor browser compatibility and its removal from the HTML5 specification, **do not use this attribute in modern production environments**. --- ## Modern Alternative: The `` Element To achieve the exact same functionality with full support across all modern browsers and compliance with HTML5 standards, use the `` and `` elements instead. ### Modern Standard Example: ```html Planets Sun Mercury Venus ```
← Att A TargetAtt A Rev β†’

YouTip © 2024-2026 | Home | Learn Technology, Build Dreams!

All content is for educational and learning purposes only.