mozilla
Your Search Results

    a

    The SVG Anchor Element (<a>) defines a hyperlink

    Usage context

    Categories Container element
    Permitted content Any number of the following elements, in any order:
    Animation elements »
    Descriptive elements »
    Shape elements »
    Structural elements »
    Gradient elements »
    <a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view>
    Normative document SVG 1.1 (2nd Edition)

    Example

    <svg width="140" height="30"
         xmlns="http://www.w3.org/2000/svg" 
         xmlns:xlink="http://www.w3.org/1999/xlink">
    
      <a xlink:href="https://developer.mozilla.org/en-US/docs/SVG"
         target="_blank">
        <rect height="30" width="120" y="0" x="0" rx="15"/>
        <text fill="white" text-anchor="middle" 
              y="21" x="60">SVG on MDN</text>
      </a>
    
    </svg>

    Live result:

    Attributes

    Global attributes

    Specific attributes

    DOM Interface

    This element implements the SVGAElement interface.

    Browser compatibility

    Feature Chrome Firefox (Gecko) IE Opera Safari
    Basic support 1.0 1.5 (1.8) 9.0 9.0 3.0.4
    Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
    Basic support 3.0 1.0 (1.8) Not supported (Yes) 3.0.4

    The chart is based on these sources.

    Note: No browser supports the full XLink set.

    Document Tags and Contributors

    Contributors to this page: ethertank, teoli, Manuel_Strehl, kscarfone, Jeremie
    Last updated by: kscarfone,