SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot marbly's Avatar
    Join Date
    Nov 2005
    Location
    Croatia
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    subscript in alt attribute

    How do I get superscript and subscript text in alt attribute? Do I use entities?

    The text is about chemical formulas.

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Well, you won't be able to do it with markup tags since ALT is plain text. Thus using the Unicode http://en.wikipedia.org/wiki/Unicode...d_superscripts or similar as a fake would make most sense though obviously the results will depend on the font and encoding, etc.

  3. #3
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    If your image is a water molicule, just do "h 2 o" versus h <sub>2</sub> O

    Way more info, but an interesting read: http://en.wikipedia.org/wiki/Wikiped...lity/Archive_8
    Ryan B | My Blog | Twitter

  4. #4
    SitePoint Zealot marbly's Avatar
    Join Date
    Nov 2005
    Location
    Croatia
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you!

    I'm using utf-8 so I don't think there will be problems with unicode entities, I'll go that way.


Tags for this Thread

Bookmarks

Posting Permissions

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