Change link text via CSS

Unfortunately, sometimes you have to take on tasks that are not entirely adequate and strange. Among other changes on one site, it was necessary to change the text of one link, while not getting into the FTP of the site and without making changes to the plugin that displayed this link. Fortunately, the link had an identifier, according to which, with the help of CSS and a couple of minutes of googling, this solution appeared

<a href="#" id="linkid">Some Trash Text</a>
<style>
    #linkid {font-size:0;}
    #linkid::after {content:"New Link Text"; font-size: 15px;}
</style>

As a result, in the link we will display the new text that we have written in: after. Of course the decision is clumsy, but working.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
The comment language code.