title: How to add CSS style to focused anchor in HTML
body: <p>On page 1 there is a link which takes you to a certain point on page 2</p>
  
  <p><code>&lt;a href="page2.html#position"&gt;MY TEXT HERE&lt;/a&gt;</code></p>
  
  <p>This takes you straight to the anchor (position) on page 2 with the following code</p>
  
  <pre><code>&lt;a name="position"&gt; MORE TEXT HERE&lt;/a&gt;
  </code></pre>
  
  <p>Now, my question is how can I change the text and background color when #position is in the URL?</p>
  
  <p>For example: www.domainname.com/page2.html#position</p>
  
  <p>This is the CSS I used but doesn't work:</p>
  
  <pre><code>#position {
  color:#ff0000;
  background-color:#f5f36e;
  }
  </code></pre>
  
  <p>Here is a example <a href="http://jsfiddle.net/jvtcj/2/" rel="noreferrer">http://jsfiddle.net/jvtcj/2/</a></p>
  
  <p>Thank you in advance!</p>