Webmaster Sun Login
Not a member yet? Sign up

how to add title tag in svg icon files as tooltips on hover

  • HOME
  • FORUMS
  • WHAT'S NEW
  • BLOGS
  • MARKETPLACE
  • ADVERTISING
  • SPECIAL OFFERS
  • WEB HOSTING
  • QUICK MENU
  • REGISTER HERE - Join us for FREE
Results 1 to 3 of 3
    Stick this thread
  1. #1
    Join Date
    May 2017
    Posts
    31
    Thumbs Up/Down
    Received: 3/0
    Given: 1/0
    Thanks
    5
    Thanked 2 Times in 2 Posts

    how to add title tag in svg icon files as tooltips on hover

    now i am implementing svg icon in my website and and it is for categories.

    i am not going to show categories name only icons and on hove it should show the category name.

    so i want to know how to add title tags in svg icon file so i can make it as tooltip on hover.

    now i am using flaticon svg icon file.

  2. #2
    Join Date
    Jan 2017
    Posts
    16
    Thumbs Up/Down
    Received: 1/0
    Given: 0/0
    Thanks
    0
    Thanked 2 Times in 2 Posts
    For SVG you need to use a nested <title> element rather than a title attribute. E.g. <polygon points="..."><title>your title</title></polygon>

  3. The Following User Says Thank You to achat For This Useful Post:
    godmadeus (06-02-2017)

  4. #3
    Join Date
    Jul 2019
    Location
    Ahemdabad
    Posts
    1
    Thumbs Up/Down
    Received: 0/0
    Given: 0/0
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Text in a <title> element is not rendered as part of the graphic, but browsers usually display it as a tooltip. If an element can be described by visible text, it is recommended to reference that text with an aria-labelledby attribute rather than using the <title> element.
    HTML Code:
    <svg viewBox="0 0 20 10" >
      <circle cx="5" cy="5" r="4">
        <title>I'm a circle</title>
      </circle>
    
      <rect x="11" y="1" width="8" height="8">
        <title>I'm a square</title>
      </rect>
    </svg>
    
    <style>
    html,body,svg { height:100% }
    </style>

Newer Threads

  1. SillyHatAffiliate
    Marc van Leeuwen
    Replies: 6 | Views: 884
    Last post by Marc van Leeuwen, 05-19-2017, 03:10 PM
  2. Mike30
    Mike30
    Replies: 9 | Views: 1306
    Last post by Mike30, 05-19-2017, 06:24 PM
  3. stgeorgehosting
    christax
    Replies: 1 | Views: 1213
    Last post by christax, 05-12-2017, 05:10 AM
  4. Techrev
    Techrev
    Replies: 4 | Views: 1241
    Last post by Techrev, 07-19-2017, 07:49 AM
  5. SillyHatAffiliate
    Marc van Leeuwen
    Replies: 10 | Views: 1710
    Last post by Marc van Leeuwen, 05-21-2017, 01:12 PM

Older Threads

  1. carlbrewster
    Hello All
    By carlbrewster in forum New Member Introductions
    Ronekerry
    Replies: 6 | Views: 1026
    Last post by Ronekerry, 06-18-2017, 01:54 AM
  2. lkovnih226
    chiru77
    Replies: 15 | Views: 2165
    Last post by chiru77, 06-05-2017, 11:30 AM
  3. Techrev
    ulterios
    Replies: 3 | Views: 612
    Last post by ulterios, 05-10-2017, 03:14 AM
  4. digitalkms
    digitalkms
    Replies: 0 | Views: 775
    Last post by digitalkms, 05-09-2017, 09:56 PM

Latest Threads

  1. denverdonate
    denverdonate
    Replies: 0 | Views: 399
    Last post by denverdonate, 12-05-2019, 10:56 PM
  2. PaymentGateway
    stephenrobes
    Replies: 4 | Views: 121
    Last post by stephenrobes, Today, 10:49 AM
  3. acmediagroup
    hello to all
    By acmediagroup in forum New Member Introductions
    acmediagroup
    Replies: 0 | Views: 90
    Last post by acmediagroup, 12-04-2019, 09:04 AM
  4. Aby
    Aby
    Replies: 0 | Views: 118
    Last post by Aby, 12-03-2019, 11:53 AM

Similar Threads

  1. markdenz
    markdenz
    Replies: 5 | Views: 2846
    Last post by markdenz, 04-29-2015, 10:05 PM
  2. arronmattwills
    arronmattwills
    Replies: 0 | Views: 1597
    Last post by arronmattwills, 02-03-2014, 04:40 AM
  3. richard84
    richard84
    Replies: 0 | Views: 1343
    Last post by richard84, 11-13-2013, 07:56 AM
  4. jdunhin
    CSS hover Box
    By jdunhin in forum Content Management
    jdunhin
    Replies: 0 | Views: 1486
    Last post by jdunhin, 02-27-2013, 07:45 AM
  5. jdunhin
    jdunhin
    Replies: 0 | Views: 1179
    Last post by jdunhin, 02-27-2013, 07:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Internet Marketing Forum

Webmaster Sun is a forum where you’ll find in-depth discussions and resources to help you succeed on the web whether you are new or experienced. You’ll find it all here. With topics ranging from internet marketing, search engine optimization, social networking, make money online, web hosting, affiliate marketing as well as hands-on technical support for web design, programming and more. We are a growing community of like-minded people that is keen to help and support each other with ambitions and online endeavors. Learn and grow, make friends and contacts for life.

Come Hang Out With Us

    Facebook Twitter Webmaster Forum Google+

    Webmaster Sun Logo
Copyright ©2012 - 2019, WebmasterSun.com. All rights reserved. Internet marketing forum for internet marketers, webmasters, web hosting providers, designers and affiliate marketers.

Welcome to Webmaster Sun

The World's Number 1 Webmaster Community, SEO and Marketplace

Log in!

Continue with Facebook
Continue With Email. By signing up you indicate that you have read and agree to the Terms of Service and Privacy Policy.

Sign in Manually

Need an account? Sign up now!