title: Is the concept of a link inseparable from its html markup?
body: <p>I'm looking for a strategy for managing links within articles.  The body of the article is saved in a database and pulled during page assembly. What all should be saved in the database to easily define and manage links?</p>
  
  <p>Some purists believe that markup should NEVER be stored in the database.  Some believe its ok in moderation.  But to me, the notion of a link is almost inseparable from its html markup.</p>
  
  <p>Is there a better, more succinct way of representing a link in an article (in a database) than simply embedding "anchor text"?</p>
  
  <p>One idea I've kicked around involves embedding just enough markup to semantically describe areas of interest, and in a different table, map those notions to actual URLs.  All encounters of a particular notion get wrapped with the link.</p>
  
  <pre><code>&lt;p&gt;Here is an example of a
  &lt;span class="external-reference semantic-web"&gt;semantic&lt;/span&gt; 
  approach to link management.&lt;/p&gt;
  </code></pre>
  
  <p>A table then might associate the URL of the article and the key class of 'semantic-web' to a URL like <a href="http://en.wikipedia.org/wiki/Semantic_Web" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Semantic_Web</a></p>
  
  <pre><code>&lt;p&gt;Here is an example of a &lt;span class="external-reference semantic-web"&gt;
  &lt;a href="http://en.wikipedia.org/wiki/Semantic_Web"&gt;semantic&lt;/a&gt;&lt;/span&gt; 
  approach to link management.&lt;/p&gt;
  </code></pre>
  
  <p>Things I like about this approach is that all my URLs are in one location in the database.  I could technically change or remove links without touching the body of the article. I have very good class names for CSS.</p>
  
  <p>I don't like having another table to maintain, and another step/phase in render time.  It could slow down response time.</p>
  
  <p>Are there any other strategies out there that provide superior link management?</p>