<?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>Furry Brains &#187; html</title>
	<atom:link href="http://furrybrains.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://furrybrains.com</link>
	<description>The Furry Brains blog tackles a wide range of issues related to web development and design.</description>
	<lastBuildDate>Mon, 22 Jun 2009 16:39:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>An HTML Primer for Writers and Editors</title>
		<link>http://furrybrains.com/2009/01/06/an-html-primer-for-writers-and-editors/</link>
		<comments>http://furrybrains.com/2009/01/06/an-html-primer-for-writers-and-editors/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 20:26:13 +0000</pubDate>
		<dc:creator>Jim Dalton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://furrybrains.com/?p=108</guid>
		<description><![CDATA[A year ago, I wrote up a brief primer on HTML for some colleagues that was intended for writers and editors. By this I mean I tried to keep technical jargon to a minimum and focused on appealing to writers&#8217; and editors&#8217; love of semantics and grammar.
I was just forwarding it to someone who didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>A year ago, I wrote up a brief primer on HTML for some colleagues that was intended for writers and editors. By this I mean I tried to keep technical jargon to a minimum and focused on appealing to writers&#8217; and editors&#8217; love of semantics and grammar.</p>
<p>I was just forwarding it to someone who didn&#8217;t know any HTML, and I figured it makes sense to post it here for the benefit of anyone else who stumbles upon it.</p>
<h3>Why You Should Care About <span class="caps">HTML</span></h3>
<p>For writers and editors, <span class="caps">HTML</span> probably seems at best like a minor nuisance. The fact that it was written by (and to some extent conceived of for) programmers is probably a big reason why.</p>
<p>In fact, <span class="caps">HTML</span> is pretty easy to learn conceptually. And these days, <span class="caps">HTML</span> has mostly been stripped of what once made it a  &#8220;programming&#8221; or design language. Properly used, <span class="caps">HTML</span> has now become a way for content authors to define the meaning of various aspects of a web document. In fact, content authors and editors are really the <em>only</em> people who can properly mark up a document and ensure it&#8217;s being done correctly.</p>
<p>Here are just a few of the reasons why you should care (passionately) about <span class="caps">HTML</span>:</p>
<p><span id="more-108"></span></p>
<ul>
<li><strong>Both people <em>and</em> computers need to read your documents.</strong> In general, we write and edit for people. But on the web, people aren&#8217;t the only ones who read your document — machines read it as well. Proper <span class="caps">HTML</span> is like good grammar for machines.</li>
<li><strong>Good <span class="caps">HTML</span> makes it easier for designers and programmers to do their jobs.</strong> Designers are charged with making your documents <em>look</em> right and programmers are charged with making them <em>work</em> right. When you play by the <span class="caps">HTML</span> rules, you give them the freedom to focus on what they do best.</li>
<li><strong>Your documents will last forever.</strong> The web is constantly evolving. Programmers come up with new tricks for working with web documents every day, and designers constantly have new design tools added to their arsenal. Good <span class="caps">HTML</span> is forward compatible, meaning your documents themselves can evolve as well, no matter which way technology goes in the future.</li>
<li><strong>You can add a whole new level of meaning to your documents for readers.</strong> Used properly, <span class="caps">HTML</span> allows you to give readers more information about what various parts of your documents mean. For example, you can seamlessly define abbreviations, cite quotations, or identify people and places without intefering with the readability of your documents.</li>
</ul>
<h3>What <span class="caps">HTML </span><em>Is</em> and <em>Isn&#8217;t</em></h3>
<p>In simple terms, <span class="caps">HTML</span> is a markup langauge that allows content authors and editors to explicitly define the <strong>semantic</strong> meaning of various aspects of a web document. That&#8217;s a simple and true definition, but it conflicts with what most people think <span class="caps">HTML</span> is and how most people use it. Unless you grasp this definition of <span class="caps">HTML</span>, you&#8217;re doomed to use it improperly.</p>
<p>Here&#8217;s an easy way to think about it:</p>
<blockquote>
<p>HTML is not a way of making a document <em>look</em> or <em>function</em> in a certain way. Instead, <span class="caps">HTML</span> is a way of <em>describing</em> what a document <em>is</em>.</p>
</blockquote>
<p>Here&#8217;s a quick little example that illustrates where most people go astray in their thinking.</p>
<pre>Our CEO was featured in Time magazine today.</pre>
<p>When preparing to mark this sentence up in <span class="caps">HTML</span>, most writers or editors would think: &#8220;Okay, I just need to put the title of the publication &#8216;Time&#8217; in italics.&#8221; This is a natural reaction, since you&#8217;ve been trained to put publications in italics throughout your life, and most of us are accustomed to pressing the little &#8220;I&#8221; button in Microsoft Word when we want something to appear in italics.</p>
<p>While that line of thinking isn&#8217;t entirely wrong, it isn&#8217;t entirely right either — at least from a sematnics perspective. The problem is that it conflates two related but separate concepts: presentation (in this case, the <em>italics</em>) and meaning (in this case, emphasis, which is what the italics are actually conveying).</p>
<p>We can see the difference in practice. One way to mark up the document (in an older version of <span class="caps">HTML</span>) was to use the italics tag, <code>&lt;i&gt;</code>:</p>
<pre>Our CEO was featured in &lt;i&gt;Time&lt;/i&gt; magazine today.</pre>
<p>The newer version of <span class="caps">HTML</span>, however, insists upon defining this text not by how it should appear, but by what it means, in this case using the <code>&lt;cite&gt;</code> (citation) tag:</p>
<pre>Our CEO was featured in &lt;cite&gt;Time&lt;/cite&gt; magazine today.</pre>
<p>Citations, by default, are rendered as italics in most browsers, so for readers, the two ways of coding this document appear the same. If that makes the distinction seem merely academic, it&#8217;s not. There are some real ramifications to the two different approaches. To name a few:</p>
<ul>
<li>A content author might decide to provide a link to the home page of the publication being cited.</li>
<li>A designer might choose to render citations with a different look — using the color green or a small graphic rather than just italics.</li>
<li>A programmer might build a function that provides a complete list of references cited in an article at the bottom of the article, which can be generated on the fly.</li>
</ul>
<p>There are many examples similar to this one — some with big implications, and others that are largely academic.</p>
<p>Nevertheless, good <span class="caps">HTML</span> is like good grammar. Although at the end of the day, you can very like ignore the rules of grammar and still get your point across, consistent use of good grammar makes your documents more readable and your image more professional. Good <span class="caps">HTML</span> has plenty of its own benefits — both obvious and hidden.</p>
<h3>HTML Basics</h3>
<p>Now that you understand the proper way to conceive of <span class="caps">HTML</span>, and are as convinced as I am of the importance of separating meaning from presentation and functionality, it&#8217;s time to get down to brass tacks and describe how to actually use <span class="caps">HTML</span>.</p>
<p><span class="caps">HTML</span> is a markup language; i.e. it&#8217;s used to &#8220;mark up&#8221; a document. Think of it like a highlighter pen. When you mark up a word or phrase with <span class="caps">HTML</span>, it&#8217;s like drawing a yellow line through it. The only difference is, you add a bit of description when using <span class="caps">HTML</span> to explain what the yellow line actually means.</p>
<p>Fortunately, <span class="caps">HTML</span> is quite simple. Like with any foreign language, there are some vocabulary words you&#8217;ll eventually need to learn, but conceptually <span class="caps">HTML</span> boils down to three concepts:</p>
<ol>
<li>Tags</li>
<li>Elements</li>
<li>Attributes and values</li>
</ol>
<p>Let&#8217;s briefly put these terms in context, and then tackle them one by one. Following is a phrase marked up with generic <span class="caps">HTML</span>:</p>
<pre>&lt;element attribute="value"&gt;The cat is black.&lt;/element&gt;</pre>
<p>In the context of the example above:</p>
<ul>
<li><strong>A <em>tag</em> is everything that comes between, and inclusive of, the angle brackets (<code>&lt;</code> and <code>&gt;</code>).</strong> <span class="caps">HTML</span> phrases <em>always</em> start with an opening tag (e.g. <code>&lt;element&gt;</code>) and end with a closing tag (e.g. <code>&lt;/element&gt;</code>). To use our metaphor from above, they define where you start putting your highlighter marker on the page and where you stop. (That&#8217;s why you <strong>must</strong> close all tags. If you don&#8217;t, a browser won&#8217;t be able to know where you wanted to stop your highlighter.)</li>
<li><strong>An <em>element</em> is a word that describes <em>what</em> the phrase your marking up is.</strong> Common elements include a paragraph (<code>&lt;p&gt;</code>), a list item (<code>&lt;li&gt;</code>), a hyperlink (<code>&lt;a&gt;</code>), an abberviation (<code>&lt;abbr&gt;</code>), or an image (<code>&lt;img</code>>). There are approximately 40 or so elements and only about 15 or 20 that are commonly used.</li>
<li><strong>An <em>attribute/value pair</em> provides more information about the phrase being marked up and is not always required.</strong> Attribue/value pairs are used, for example, to define the destination of a hyperlink (e.g. <code>&lt;a href="http://www.yahoo.com"&gt;</code>), the source of an image file (e.g. <code>&lt;img src="http://www.photo.com/my_picture.jpg"&gt;</code>, or the meaning of an abbreviation (e.g. <code>&lt;abbr title="United Nations"&gt;U.N.&lt;/abbr&gt;</code>).</li>
</ul>
<p>That&#8217;s really all there is to it. <span class="caps">HTML</span> is not more fancy than that. There are just a few syntax rules you need to learn and abide by in order to ensure your <span class="caps">HTML</span> is correct and a few element definitions you need to know to start using <span class="caps">HTML</span>.</p>
<p>Let&#8217;s start with syntax.</p>
<h3>HTML Syntax</h3>
<p>The example from above&#8230;</p>
<pre>&lt;element attribute="value"&gt;The cat is black.&lt;/element&gt;</pre>
<p>&#8230;is properly formatted <span class="caps">HTML</span>. The rules are pretty straightforward and easy to follow.</p>
<ol>
<li><strong>HTML is case sensitive.</strong> <em>Always</em> use lowercase for elements and attribute names.</li>
<li>A tag <em>always</em> starts with <code>&lt;</code> and ends with <code>&gt;</code>. If you forget to put a <code>&gt;</code> at the end of your tag, you&#8217;re going to confuse the computer, it won&#8217;t know where your tag ends!</li>
<li><strong>An <span class="caps">HTML</span> phrase <em>always</em> opens with a start tag (<code>&lt;element&gt;</code>) and closes with an end tag (<code>&lt;/element&gt;</code>).</strong> The forward slash <code>/</code> is what makes a tag an end tag. <strong>Exception</strong>: There are a few tags called &#8220;empty tags&#8221; that don&#8217;t a phrase between them. An example is the img tag, which generally looks like this: <code>&lt;img src="[image URL]"&gt;</code>. <em>Empty tags still must be closed.</em> They are closed by adding a space and a forward slash at the end, as follows in our example: <code>&lt;img src="[image URL]" /&gt;</code>.</li>
<li><strong>The value of an attribute must <em>always</em> be placed in quotes.</strong> For example <code>&lt;a href="http://www.yahoo.com"&gt;</code> and not <code>&lt;a href=http://www.yahoo.com&gt;</code>. Don&#8217;t forget to close your quotation marks! The incorrect <code>&lt;a href="http://www.yahoo.com&gt;</code> will cause you nightmares.</li>
<li><strong>Multiple attribute/value pairs should be separated by a space.</strong> For example, <code>&lt;a href="http://www.yahoo.com" title="Yahoo! home page" class="external_link"&gt;</code>.</li>
<li><strong>HTML phrases must be properly nested.</strong> This is best demonstrated by example. Correct: <code>&lt;p&gt;That statement is &lt;em&gt;ridiculous.&lt;/em&gt;&lt;/p&gt;</code> Incorrect: <code>&lt;p&gt;That statement is &lt;em&gt;ridiculous.&lt;/p&gt;&lt;/em&gt;</code></li>
</ol>
<p>Those are the ground rules — the <em>grammar</em> of <span class="caps">HTML</span>, if you will — and that&#8217;s all you really need to know. Everything else is just a matter of definitions and specifics. A good reference guide, like <a href="http://www.htmlhelp.com/reference/html40/" rel="nofollow">the guide at htmlhelp.com</a> will give you easy definitions for every element and attribute. (Be forwarned, however, that most guides are written for an earlier version of <span class="caps">HTML</span> and might imply that you can ignore the above syntax rules, which you cannot).</p>
<p>There are plenty of tools out there that will help you code <span class="caps">HTML</span> more quickly than you can by hand. But if you take the time to learn the actual mechanics of <span class="caps">HTML</span>, and if you internalize the concepts behind it, you&#8217;ll find yourself with much more control over the meaning of your documents and in a position to provide much more value to your readers.</p>
]]></content:encoded>
			<wfw:commentRss>http://furrybrains.com/2009/01/06/an-html-primer-for-writers-and-editors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
