Answers.Body: <p>You can use a couple CSS selectors to style links.</p>
  
  <p><code>a:link</code> will select and style all unvisited links, while <code>a:visited</code>, surprisingly enough, will do the same with visited ones.</p>
  
  <p>Examples:</p>
  
  <pre><code>a:link { 
      text-decoration: underline;
  }
  </code></pre>
  
  <hr>
  
  <pre><code>a:visited { 
      background-color: grey;
  }
  </code></pre>
  
  <p>Remember that epub files are often read on B&amp;W e-ink devices, so you should consider this if you want to differentiate links by using colors; the result might not be as expected.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-01T13:44:17.957Z
Answers.LastActivityDate: 2017-03-01T13:44:17.957Z
Answers.UserDisplayName: Sekhemty
Answers.Body: <p>You can use these CSS styling for links.</p>
  
  <pre><code>/* unvisited link */
  a:link { 
  color: green;
  }
  
  /* visited link */
  a:visited {
  color:red;
  }
  
  /* mouse over link */
  a:hover {
  color: blue;
  }
  
  /* selected link */
  a:active { 
  color: orange;
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-16T09:01:01.193Z
Answers.LastActivityDate: 2017-03-17T14:02:06.633Z
Answers.LastEditDate: 2017-03-17T14:02:06.633Z
Answers.UserDisplayName: Leon William
Body: <p>Suppose I insert the following anchor in an epub...</p>
  
  <pre><code>&lt;span id="horse"&gt;&lt;/span&gt;The first horses in America . . .
  </code></pre>
  
  <p>Then I insert a link in the index...</p>
  
  <pre><code>Horse, in America, &lt;a href="..Text/chapter1#horse"&gt;23&lt;/a&gt;
  </code></pre>
  
  <p>Is there something I can do to make the anchored text somehow more visible if someone clicks the link? In other words, I don't want someone to click the link in the index, then spend several seconds trying to find whatever it is they're looking for.</p>
  
  <p>I'd like anchored text to appear bold, red, underlined, with a background color, or something like that. I imagine I'd have to put INSIDE the span, like this...</p>
  
  <pre><code>&lt;span id="horse"&gt;The first horses in America&lt;/span&gt; . . .
  </code></pre>
  
  <p>My understanding is that Epub 2.0 is compatible with far more devices than Epub 3.0, so that's what I'm working with. However, I could upgrade to 3.0 if it's needed to activate some sort of CSS or JS needed to make this work.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-27T09:26:55.237Z
Comments.Text: What about using a CSS style like "a:link {your-style-here}" ?
Comments.UserDisplayName: Sekhemty
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-27T20:46:55.150Z
Comments.Text: I'll give that a try. It sound like it should work.
Comments.UserDisplayName: WordBear
Tags: <epub><html><editing><css>
Title: How can I highlight visited anchors in an epub?
UserDisplayName: WordBear
ThreadText: # How can I highlight visited anchors in an epub?
  
  (Asked by: username_0 on 2017-02-27)
  
  Suppose I insert the following anchor in an epub...
  
  ```
  <span id="horse"></span>The first horses in America . . .
  
  ```
  
  Then I insert a link in the index...
  
  ```
  Horse, in America, <a href="..Text/chapter1#horse">23</a>
  
  ```
  
  Is there something I can do to make the anchored text somehow more visible if someone clicks the link? In other words, I don't want someone to click the link in the index, then spend several seconds trying to find whatever it is they're looking for.
  
  I'd like anchored text to appear bold, red, underlined, with a background color, or something like that. I imagine I'd have to put INSIDE the span, like this...
  
  ```
  <span id="horse">The first horses in America</span> . . .
  
  ```
  
  My understanding is that Epub 2.0 is compatible with far more devices than Epub 3.0, so that's what I'm working with. However, I could upgrade to 3.0 if it's needed to activate some sort of CSS or JS needed to make this work.
  
  **Tags:** epub, html, editing, css
  
  > **Comments:**
  > **username_1**: What about using a CSS style like "a:link {your-style-here}" ?  
  > **username_0**: I'll give that a try. It sound like it should work.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-03-01. Score: 1 | Accepted answer
  
  You can use a couple CSS selectors to style links.
  
  `a:link` will select and style all unvisited links, while `a:visited`, surprisingly enough, will do the same with visited ones.
  
  Examples:
  
  ```
  a:link { 
      text-decoration: underline;
  }
  
  ```
  
  ---
  
  ```
  a:visited { 
      background-color: grey;
  }
  
  ```
  
  Remember that epub files are often read on B&W e-ink devices, so you should consider this if you want to differentiate links by using colors; the result might not be as expected.
  
  
  ---
  
  ### Answer by username_2 on 2017-03-16. Score: 1
  
  You can use these CSS styling for links.
  
  ```
  /* unvisited link */
  a:link { 
  color: green;
  }
  
  /* visited link */
  a:visited {
  color:red;
  }
  
  /* mouse over link */
  a:hover {
  color: blue;
  }
  
  /* selected link */
  a:active { 
  color: orange;
  }
  
  ```
  
  
  ---
  
  