WordPress.org

Forums

Rollover Text on Text (4 posts)

  1. loch
    Member
    Posted 4 years ago #

    My request is simply to learn how to make a single word in a bunch of text, have a rollover feature that would display a small text block with a definition for that word.

    ie: in the following sentence, the word "Nixon" when hovered over with a cursor, would reveal a box of text containing: "37th President of the USA"

    It was in his final year that Nixon reached the most controversy.

    Many thanks to you all...

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    <span title="37th President of the USA">Nixon</span>

  3. Yojance Rabelo
    Member
    Posted 4 years ago #

    Use the abbr or acronym HTML element.
    http://www.w3schools.com/TAGS/tag_abbr.asp
    http://www.w3schools.com/TAGS/tag_acronym.asp

    <acronym title="North Atlantic Treaty Organisation">NATO</acronym>
  4. esmi
    Forum Moderator
    Posted 4 years ago #

    No - that would not be semantically correct! "37th President of the USA" is not the full expansion of the word "Nixon".

Topic Closed

This topic has been closed to new replies.

About this Topic