SVG <title> element

The <title> SVG element provides an accessible, short-text description of any SVG container element or graphics element.

Text in an <title> element is not rendered as part of the graphic, but browsers usually display it as a tooltip. When you hover over the element, the title of that element will be shown.

Syntax:

<title> TITLE HERE </title>

Attributes:

  • core Attributes: These attributes are core attributes like id, etc.
  • styling Attributes: These attributes define styling, exp, class, style.

Example: Making green consecutive circles inheriting attributes from the <g> element.



filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<body>
    <svg viewBox="0 0 100 100">
        <circle cx="5" cy="5" r="2" fill="green">
            <title>I'm a Geeky Circle</title>
        </circle>
    </svg>
</body>
  
</html>

chevron_right


Output:

Browsers Supported:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera

full-stack-img

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.