<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HTML5 Doctor &#187; mark</title>
	<atom:link href="http://html5doctor.com/tag/mark/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Tue, 27 Jul 2010 14:36:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Draw attention with mark</title>
		<link>http://html5doctor.com/draw-attention-with-mark/</link>
		<comments>http://html5doctor.com/draw-attention-with-mark/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:10:43 +0000</pubDate>
		<dc:creator>Mike Robinson</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[mark]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=771</guid>
		<description><![CDATA[Other than allowing Mark's everywhere to <em>rejoice</em> that they have an element that shares their name, HTML 5 introduces mark as a way to highlight text to indicate its relevance to the user. Read on as we tally up the uses of this new element.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;source=html5doctor&amp;style=normal&amp;service=is.gd" height="61" width="50" /><br />
			</a>
		</div>
<p>Other than allowing Marks everywhere to <em>rejoice</em> that they have an element that shares their name, HTML 5 introduces <code>mark</code> as a way to highlight text to indicate its relevance to the user. Read on as we tally up the uses of this new element.<span id="more-771"></span></p>
<p>As always, the defining text passed down to us in the <a href="http://dev.w3.org/html5/spec/Overview.html#the-mark-element">specification</a>:</p>
<blockquote><p>The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader&#8217;s attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user&#8217;s current activity.</p>
</blockquote>
<p>Both uses are aimed at drawing attention to what is relevant to the user. <code>mark</code> can provide a very useful aid to the user with appropriate styling.</p>
<h2>Examples</h2>
<h3>Search Results</h3>
<p>A prime example of how to use <code>mark</code> today is to highlight the term a user has searched for. Many search engines already do this using other methods to mark the text, which shows the need for this new element.</p>
<pre><code>&lt;h1&gt;716,000,000 search results for the query &quot;&lt;mark&gt;HTML 5&lt;/mark&gt;&quot;&lt;/h1&gt;
&lt;section id=&quot;search-results&quot;&gt;
  &lt;article&gt;
    &lt;h2&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/HTML_5&quot;&gt;&lt;mark&gt;HTML 5&lt;/mark&gt; - Wikipedia, the free encyclopedia&lt;/a&gt;&lt;/h2&gt;
    &lt;p&gt;&lt;mark&gt;HTML 5&lt;/mark&gt; is the next major revision of &lt;mark&gt;HTML&lt;/mark&gt; (&quot;hypertext markup language&quot;), the core markup language of the World Wide Web. The WHATWG started work on the ... &lt;a href=&quot;http://en.wikipedia.org/wiki/HTML_5&quot;&gt;Read more&lt;/a&gt;&lt;/p&gt;
  &lt;/article&gt;
  &lt;article&gt;
    &lt;h2&gt;&lt;a href=&quot;http://dev.w3.org/html5/spec/Overview.html&quot;&gt;&lt;mark&gt;HTML 5&lt;/mark&gt;&lt;/a&gt;&lt;/h2&gt;
    &lt;p&gt;A vocabulary and associated APIs for &lt;mark&gt;HTML&lt;/mark&gt; and XHTML. Editor's Draft 16 August 2009. Latest Published Version: http://www.w3.org/TR/&lt;mark&gt;html5&lt;/mark&gt;/; Latest Editor's ... &lt;a href=&quot;http://dev.w3.org/html5/spec/Overview.html&quot;&gt;Read more&lt;/a&gt;&lt;/p&gt;
  &lt;/article&gt;
  &lt;article&gt;
    &lt;h2&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/&quot;&gt;&lt;mark&gt;HTML 5&lt;/mark&gt;&lt;/a&gt;&lt;/h2&gt;
    &lt;p&gt;Multiple-page version: http://whatwg.org/&lt;mark&gt;html5&lt;/mark&gt;; One-page version: http://www.whatwg.org/specs/web-apps/current-work/; PDF print versions: ... &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/&quot;&gt;Read more&lt;/a&gt;&lt;/p&gt;
  &lt;/article&gt;
  &lt;article&gt;
    &lt;h2&gt;&lt;a href=&quot;http://html5gallery.com/&quot;&gt;&lt;mark&gt;HTML5&lt;/mark&gt; Gallery | A showcase of sites using &lt;mark&gt;HTML 5&lt;/mark&gt; markup&lt;/a&gt;&lt;/h2&gt;
    &lt;p&gt;A showcase of sites using &lt;mark&gt;html5&lt;/mark&gt; markup, with twin primary aims to help web designers and developers of how to implement &lt;mark&gt;html5&lt;/mark&gt; into their sites now, ... &lt;a href=&quot;http://html5gallery.com/&quot;&gt;Read more&lt;/a&gt;&lt;/p&gt;
  &lt;/article&gt;
&lt;/section&gt;
&lt;nav&gt;
  &lt;ol&gt;
    &lt;li&gt;1&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;3&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;4&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;5&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;...&lt;/li&gt;
  &lt;/ol&gt;
&lt;/nav&gt;
</code></pre>
<p><a href="http://jsbin.com/uleza">View a live example</a></p>
<p>Any instance of &#8220;HTML 5&#8243;, and even simply &#8220;HTML&#8221;, has been marked as relevant to the user&#8217;s search. This can help the user see how relevant their search results are, so they can pick the best results for what they need. When implementing this in a language like PHP, you can use functions like <a href="http://php.net/str_replace"><code>str_replace()</code></a> or some clever <a href="http://en.wikipedia.org/wiki/Regular_expression">regular expressions</a> to find the search term within your output and wrap <code>mark</code> around each instance.</p>
<h3>Quotes</h3>
<p>In all the brilliant things that have been said, there is always a chance that someone will come back to scrutinize parts in the future. These pieces of text or speech may not have had any importance when they were original formed, and hence not been given such emphasis, but now have attracted particular interest by a another party. <code>mark</code> can be used in quotations to highlight such text.</p>
<pre><code>&lt;p&gt;Mike once said:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Google won't last, &lt;mark&gt;they will fail&lt;/mark&gt; at search and advertising as nothing will topple Yahoo.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Of course, we now know he was wrong. Google has not failed, they excelled in search and online advertising, making them a very profitable company.&lt;/p&gt;
</code></pre>
<p>Here I have quoted myself, highlighting where I was wrong in my original statement and then immediately correcting this error in the following paragraph.</p>
<h2>Differences from strong and em</h2>
<p>Previously, you may have used <code>em</code> and <code>strong</code> for adding emphasis or importance, respectively, to portions of text. <code>mark</code> differs from these two as it is used purely for highlighting the relevance of a piece of text to the user and/or page&#8217;s content. In the past you may have used <code>em</code> and <code>strong</code> for this purpose, which was arguably valid at the time due to the lack of a better element, but the introduction of <code>mark</code> simply means their use will be more strict.</p>
<p>Use <code>strong</code> when you need to indicate the importance of a piece of text, such as an error or warning message, and <code>em</code> should be for adding emphasis to text, stressing words to adapt the meaning of a sentence.</p>
<h2>Final Thoughts</h2>
<p>The addition of <code>mark</code> to HTML is welcome, preventing stretching the definitions of <code>strong</code> and <code>em</code> too thin. There are many practical uses of <code>mark</code> in the world today, particularly for search and educational articles like tutorials. Put your highlighter pens down and start using <code>mark</code> to highlight relevant text (it&#8217;s better for your screen!).</p>
<p><small><strong>Disclaimer</strong>: I have nothing against Google, this was merely a fictitious example vaguely related to the use of <code>mark</code> in search. Long live Google?</small>
<div id="crp_related">
<h3>Related Posts:</h3>
<ul>
<li><a href="http://html5doctor.com/block-level-links-in-html-5/" rel="bookmark" class="crp_title">&#8220;Block-level&#8221; links in HTML5</a></li>
<li><a href="http://html5doctor.com/aside-revisited/" rel="bookmark" class="crp_title">Aside Revisited</a></li>
<li><a href="http://html5doctor.com/the-time-element/" rel="bookmark" class="crp_title">The time element (and microformats)</a></li>
<li><a href="http://html5doctor.com/html-5-boilerplates/" rel="bookmark" class="crp_title">HTML5 Boilerplates</a></li>
<li><a href="http://html5doctor.com/video-the-track-element-and-webm-codec/" rel="bookmark" class="crp_title">Video: the track element and webM codec</a></li>
</ul>
</div>
<p>Share and Save:</p>
<p>	<a rel="nofollow"  href="http://twitter.com/home?status=Draw%20attention%20with%20mark%20-%20http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F" title="Twitter"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;title=Draw%20attention%20with%20mark&amp;bodytext=Other%20than%20allowing%20Mark%27s%20everywhere%20to%20rejoice%20that%20they%20have%20an%20element%20that%20shares%20their%20name%2C%20HTML%205%20introduces%20mark%20as%20a%20way%20to%20highlight%20text%20to%20indicate%20its%20relevance%20to%20the%20user.%20Read%20on%20as%20we%20tally%20up%20the%20uses%20of%20this%20new%20element." title="Digg"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F" title="Sphinn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;title=Draw%20attention%20with%20mark" title="Reddit"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;title=Draw%20attention%20with%20mark&amp;notes=Other%20than%20allowing%20Mark%27s%20everywhere%20to%20rejoice%20that%20they%20have%20an%20element%20that%20shares%20their%20name%2C%20HTML%205%20introduces%20mark%20as%20a%20way%20to%20highlight%20text%20to%20indicate%20its%20relevance%20to%20the%20user.%20Read%20on%20as%20we%20tally%20up%20the%20uses%20of%20this%20new%20element." title="del.icio.us"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;title=Draw%20attention%20with%20mark" title="StumbleUpon"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F" title="Technorati"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Draw%20attention%20with%20mark&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F" title="Netvibes"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;t=Draw%20attention%20with%20mark" title="Facebook"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;title=Draw%20attention%20with%20mark&amp;annotation=Other%20than%20allowing%20Mark%27s%20everywhere%20to%20rejoice%20that%20they%20have%20an%20element%20that%20shares%20their%20name%2C%20HTML%205%20introduces%20mark%20as%20a%20way%20to%20highlight%20text%20to%20indicate%20its%20relevance%20to%20the%20user.%20Read%20on%20as%20we%20tally%20up%20the%20uses%20of%20this%20new%20element." title="Google Bookmarks"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Draw%20attention%20with%20mark&amp;link=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F" title="FriendFeed"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;t=Draw%20attention%20with%20mark" title="HackerNews"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;title=Draw%20attention%20with%20mark&amp;source=HTML5+Doctor+helping+you+implement+HTML5+today&amp;summary=Other%20than%20allowing%20Mark%27s%20everywhere%20to%20rejoice%20that%20they%20have%20an%20element%20that%20shares%20their%20name%2C%20HTML%205%20introduces%20mark%20as%20a%20way%20to%20highlight%20text%20to%20indicate%20its%20relevance%20to%20the%20user.%20Read%20on%20as%20we%20tally%20up%20the%20uses%20of%20this%20new%20element." title="LinkedIn"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;h=Draw%20attention%20with%20mark" title="NewsVine"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fhtml5doctor.com%2Fdraw-attention-with-mark%2F&amp;t=Draw%20attention%20with%20mark&amp;s=Other%20than%20allowing%20Mark%27s%20everywhere%20to%20rejoice%20that%20they%20have%20an%20element%20that%20shares%20their%20name%2C%20HTML%205%20introduces%20mark%20as%20a%20way%20to%20highlight%20text%20to%20indicate%20its%20relevance%20to%20the%20user.%20Read%20on%20as%20we%20tally%20up%20the%20uses%20of%20this%20new%20element." title="Tumblr"><img src="http://html5doctor.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
<p><a href="http://html5doctor.com/draw-attention-with-mark/" rel="bookmark">Draw attention with mark</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on August 18, 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/draw-attention-with-mark/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
