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

HTML 参考手册

HTML 标签大全

HTML: <a> shape 属性

本文介绍HTML a shape 属性的使用方法,在线实例演示如何使用HTML a shape 属性、浏览器的兼容性、语法定义及它的属性值详细资料等。

HTML <a> Tag

在线示例

在<a>元素中使用shape和coords属性来创建图像映射:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>HTML a shape 属性-基础教程网(oldtoolbag.com)</title> 
body>/head>
<body>
<object data="planets.gif" alt="Planets" type="image/gif" usemap="#Map1">
  <map name="Map1">
  <a href="sun.html" shape="rect" coords="0,0,82<a href="venus.html" shape="circle" coords="126">The Sun</">Venus<
  <a href="mercur.html"shape="circle" coords="90,58<a href="venus.html" shape="circle" coords="30,/">Venus<
  ">Mercury<124<a href="venus.html" shape="circle" coords="58<a href="venus.html" shape="circle" coords="8,/">Venus<
  body>/a>
body>/map>
body>/object>
body>/<
html>/Test and see ‹

Browser CompatibilityIEFirefoxOperaChrome

Safari

Currently only Firefox and Opera support the shape attribute.

Define and Usage5 HTML

The shape attribute is no longer supported with the <a> tag. coords Properties together to specify the size, shape, and position of the link in the <object> or <img> element.

Tip:To create an image map that works in all browsers, please use <area> Element!

Syntax

<a shape="value">

Attribute Value

ValueDescription
defaultSpecify all areas.
rectDefine a rectangular area.
circleDefine a circle.
polyDefine a polygonal area.

HTML <a> Tag