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: 821
    Last post by Marc van Leeuwen, 05-19-2017, 03:10 PM
  2. Mike30
    Mike30
    Replies: 9 | Views: 1208
    Last post by Mike30, 05-19-2017, 06:24 PM
  3. stgeorgehosting
    christax
    Replies: 1 | Views: 1110
    Last post by christax, 05-12-2017, 05:10 AM
  4. Techrev
    Techrev
    Replies: 4 | Views: 1123
    Last post by Techrev, 07-19-2017, 07:49 AM
  5. SillyHatAffiliate
    Marc van Leeuwen
    Replies: 10 | Views: 1593
    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: 932
    Last post by Ronekerry, 06-18-2017, 01:54 AM
  2. lkovnih226
    chiru77
    Replies: 15 | Views: 2005
    Last post by chiru77, 06-05-2017, 11:30 AM
  3. Techrev
    ulterios
    Replies: 3 | Views: 557
    Last post by ulterios, 05-10-2017, 03:14 AM
  4. digitalkms
    digitalkms
    Replies: 0 | Views: 719
    Last post by digitalkms, 05-09-2017, 09:56 PM

Latest Threads

  1. Shubham23
    Marc van Leeuwen
    Replies: 1 | Views: 51
    Last post by Marc van Leeuwen, Today, 09:46 AM
  2. shoptechmedia
    professorrosado
    Replies: 2 | Views: 123
    Last post by professorrosado, 08-16-2019, 11:45 PM
  3. ron13315
    Selling Website Templates
    By ron13315 in forum Templates
    ron13315
    Replies: 0 | Views: 269
    Last post by ron13315, 08-13-2019, 03:25 AM
  4. susanburling
    susanburling
    Replies: 0 | Views: 302
    Last post by susanburling, 08-09-2019, 11:53 AM
  5. Priyanka V
    Marc van Leeuwen
    Replies: 5 | Views: 383
    Last post by Marc van Leeuwen, Today, 09:48 AM

Similar Threads

  1. markdenz
    markdenz
    Replies: 5 | Views: 2679
    Last post by markdenz, 04-29-2015, 10:05 PM
  2. arronmattwills
    arronmattwills
    Replies: 0 | Views: 1552
    Last post by arronmattwills, 02-03-2014, 04:40 AM
  3. richard84
    richard84
    Replies: 0 | Views: 1303
    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: 1453
    Last post by jdunhin, 02-27-2013, 07:45 AM
  5. jdunhin
    jdunhin
    Replies: 0 | Views: 1143
    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!