<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <link href="https://friendlybit.com/feed/" rel="self" type="application/atom+xml" />
    <link href="https://friendlybit.com/" rel="alternate" type="text/html" />
    <updated>2010-11-03T20:20:42+01:00</updated>
    <id>https://friendlybit.com</id>
    <title type="html">Friendly Bit - Web development blog</title>
    <subtitle>Friendly Bit is a blog by Emil Stenström, a Swedish web developer that occasionally gets ideas of how to improve the internet.</subtitle>
    
        <entry>
            <title type="html">HTML5 is not an option</title>
            <link href="http://friendlybit.com/html/html5-is-not-an-option/" rel="alternate" type="text/html" title="HTML5 is not an option" />
            <published>2010-11-03T20:20:42+01:00</published>
            <updated>2010-11-03T20:20:42+01:00</updated>
            <id>http://friendlybit.com/html/html5-is-not-an-option/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">HTML5 is HOT! Developers all over the world are adapting their sites, browsers are catching up, and new fallback solutions are released every day. But many...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/html5-is-not-an-option/">
                &lt;p&gt;HTML5 is HOT! Developers all over the world are adapting their sites, browsers are catching up, and new fallback solutions are released every day. But many developers misunderstand one thing:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You can&#39;t choose to use HTML5 or not, your site will be parsed as HTML5 no matter what.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img class=&#34;alignnone size-full wp-image-656&#34; style=&#34;max-width: 100%;&#34; title=&#34;no-choice&#34; src=&#34;/files/post-media/no-choice-e1288811809935.jpg&#34; alt=&#34;Voting is pointless. I am your leader now. It is useless to resist me.&#34; /&gt;&lt;/p&gt;
&lt;p&gt;The reason is simple, HTML5 is made to be backwards compatible with the current web, so browsers don&#39;t need to keep their current parsers. All of them have soon switched to HTML5 parsers. You want to continue using HTML4? Not possible.&lt;/p&gt;
&lt;p&gt;Now. You &lt;strong&gt;can&lt;/strong&gt; choose whether you want to use the new features or not: New semantic tags, Microdata attributes, new form field types, accessibility features, 10-15 new JavaScript API:s (depending on how you count). Lots of new interesting stuff to learn.&lt;/p&gt;
&lt;p&gt;So, go read up on HTML5 if you haven&#39;t already, but don&#39;t think you can keep using HTML4. Your site is being switched over as we speak.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Rendering a web page – step by step</title>
            <link href="http://friendlybit.com/css/rendering-a-web-page-step-by-step/" rel="alternate" type="text/html" title="Rendering a web page – step by step" />
            <published>2010-01-11T01:04:33+01:00</published>
            <updated>2010-01-11T01:04:33+01:00</updated>
            <id>http://friendlybit.com/css/rendering-a-web-page-step-by-step/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Have you ever thought about what happens when you surf the web? It&#39;s not as simple as it seems: You type an URL into address bar in your preferred browser....</summary>
            <content type="html" xml:base="http://friendlybit.com/css/rendering-a-web-page-step-by-step/">
                &lt;p&gt;Have you ever thought about what happens when you surf the web? It&#39;s not as simple as it seems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You &lt;strong&gt;type an URL&lt;/strong&gt; into address bar in your preferred browser.&lt;/li&gt;
&lt;li&gt;The browser &lt;strong&gt;parses the URL&lt;/strong&gt; to find the protocol, host, port, and path.&lt;/li&gt;
&lt;li&gt;It &lt;strong&gt;forms a HTTP request&lt;/strong&gt; (that was most likely the protocol)&lt;/li&gt;
&lt;li&gt;To reach the host, it first needs to &lt;strong&gt;translate&lt;/strong&gt; the human readable host &lt;strong&gt;into an IP number&lt;/strong&gt;, and it does this by doing a DNS lookup on the host&lt;/li&gt;
&lt;li&gt;Then a &lt;strong&gt;socket needs to be opened&lt;/strong&gt; from the user&#39;s computer to that IP number, on the port specified (most often port 80)&lt;/li&gt;
&lt;li&gt;When a connection is open, the &lt;strong&gt;HTTP request is sent&lt;/strong&gt; to the host&lt;/li&gt;
&lt;li&gt;The host &lt;strong&gt;forwards the request&lt;/strong&gt; to the server software (most often Apache) configured to listen on the specified port&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;server inspects the request&lt;/strong&gt; (most often only the path), and &lt;strong&gt;launches the server plugin needed&lt;/strong&gt; to handle the request (corresponding to the server language you use, PHP, Java, .NET, Python?)&lt;/li&gt;
&lt;li&gt;The plugin gets access to the full request, and starts to prepare a HTTP response.&lt;/li&gt;
&lt;li&gt;To construct the response a &lt;strong&gt;database&lt;/strong&gt; is (most likely) &lt;strong&gt;accessed&lt;/strong&gt;. A database search is made, based on parameters in the path (or data) of the request&lt;/li&gt;
&lt;li&gt;Data from the database, together with other information the plugin decides to add, is &lt;strong&gt;combined into a long string&lt;/strong&gt; of text (probably HTML).&lt;/li&gt;
&lt;li&gt;The plugin &lt;strong&gt;combines&lt;/strong&gt; that data with some meta data (in the form of HTTP headers), and &lt;strong&gt;sends the HTTP response&lt;/strong&gt; back to the browser.&lt;/li&gt;
&lt;li&gt;The browser receives the response, and &lt;strong&gt;parses the HTML&lt;/strong&gt; (which with 95% probability is broken) in the response&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;DOM tree is built&lt;/strong&gt; out of the broken HTML&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;New requests are made&lt;/strong&gt; to the server for each new resource that is found in the HTML source (typically images, style sheets, and JavaScript files). Go back to step 3 and repeat for each resource.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stylesheets are parsed&lt;/strong&gt;, and the rendering information in each gets attached to the matching node in the DOM tree&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Javascript is parsed and executed&lt;/strong&gt;, and DOM nodes are moved and style information is updated accordingly&lt;/li&gt;
&lt;li&gt;The browser &lt;strong&gt;renders the page&lt;/strong&gt; on the screen according to the DOM tree and the style information for each node&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You&lt;/strong&gt; &lt;strong&gt;see&lt;/strong&gt; the page on the screen&lt;/li&gt;
&lt;li&gt;You get annoyed the whole process was too slow.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I, too, get annoyed when the above steps take longer than one tenth of a second. But now at least I have some documentation to look at, while waiting the remaining fractions of a second before the page renders.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/amboo213/115034446/sizes/s/&#34;&gt;&lt;img class=&#34;alignnone&#34; title=&#34;Spoiled dog - by amboo213 on Flickr&#34; src=&#34;http://farm1.static.flickr.com/45/115034446_8bf43c2273_m.jpg&#34; alt=&#34;Spoiled dog&#34; width=&#34;240&#34; height=&#34;180&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Spoiled we are, all of us.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Feel free to add more steps, through the comments…)&lt;/em&gt;&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Tapestry 5, and how not to treat HTML</title>
            <link href="http://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/" rel="alternate" type="text/html" title="Tapestry 5, and how not to treat HTML" />
            <published>2009-07-23T21:39:10+02:00</published>
            <updated>2009-07-23T21:39:10+02:00</updated>
            <id>http://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;ve previously written about how Microsoft Sharepoint mistreats HTML, and makes it look a whole other language. But truth to be told, Sharepoint (and .NET...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/">
                &lt;p&gt;I&#39;ve previously written about how &lt;a href=&#34;/html/default-html-in-sharepoint-2007/&#34;&gt;Microsoft Sharepoint&lt;/a&gt; mistreats HTML, and makes it look a whole other language. But truth to be told, Sharepoint (and .NET for that matter) isn&#39;t the only framework that can&#39;t handle HTML. I&#39;ve recently worked with a Java framework called &lt;a href=&#34;http://tapestry.apache.org/&#34;&gt;Tapestry 5&lt;/a&gt;, and it&#39;s really bad in some respects too (though not quite as bad as Sharepoint). Note that this is a review based on &lt;strong&gt;only&lt;/strong&gt; how it handles HTML, not any other of its merits. Let&#39;s get started.&lt;/p&gt;
&lt;p&gt;Many of Tapestry&#39;s problems comes from their design decision to parse the HTML you&#39;re trying to output. Yes, Tapestry parses your HTML, and adds stuff to it dynamically. This is nothing new, anyone that has played with ASP.NET knows how hidden form elements get stuffed in here and there. This is a nightmare for an interface developer, we need exact control over HTML to do our jobs well.&lt;/p&gt;
&lt;p&gt;Tapestry does horrible things to HTML:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Several extra javascripts and CSS files&lt;/strong&gt; are referenced in the head tag. There is no simple way to get rid of these.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A meta tag&lt;/strong&gt; which states that the tapestry did generate this page, is added.&lt;/li&gt;
&lt;li&gt;The two above are added to the head, and if a &lt;strong&gt;head tag doesn&#39;t exist, it gets added&lt;/strong&gt;. Never mind that your current little HTML snippet was just a little part of a page, that was being fetched with AJAX, Tapestry will add a head tag for you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;More javascript, and a hidden div&lt;/strong&gt; with a firebug-like console, is appended to the end of the body element.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Self-closing tags are expanded&lt;/strong&gt; to a start tag and an end tag (&lt;code&gt;&amp;lt;input /&amp;gt;&lt;/code&gt; gets transformed to &lt;code&gt;&amp;lt;input&amp;gt;&amp;lt;/input&amp;gt;&lt;/code&gt;), which means you can&#39;t use XHTML together with Tapestry.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;All whitespace is removed&lt;/strong&gt; by default, and you have to disable the &amp;quot;feature&amp;quot; on a tag-by-tag basis (&amp;quot;Please don&#39;t strip whitespace inside this list, IE6 goes crazy then&amp;quot;). This is a mess for interface developers, who know that whitespace matters for rendering. It was even &lt;a href=&#34;https://issues.apache.org/jira/browse/TAPESTRY-2028&#34;&gt;pointed out to Tapestry developers&lt;/a&gt; early on, but was ignored.&lt;/li&gt;
&lt;li&gt;There are ways to do loops, if:s, reference variables and generate URL:s, but all of these are based on the HTML parsing. And as a good parser, &lt;strong&gt;it skips all comments&lt;/strong&gt;. This means using tapestry template code inside a HTML comment will not work. When do you need that? Conditional comments! So what if you want an URL generated to your IE6 stylesheet? No go. You&#39;ll have to write a custom component that does that for you.&lt;/li&gt;
&lt;li&gt;Changes the &lt;strong&gt;id of all your forms to &amp;quot;form&amp;quot; and adds name=&amp;quot;form&amp;quot;&lt;/strong&gt; (which is invalid HTML).&lt;/li&gt;
&lt;li&gt;Adds a &lt;strong&gt;hidden &amp;quot;t:formdata&amp;quot; field to forms&lt;/strong&gt;, much like the dreaded ASP.NET viewstate.&lt;/li&gt;
&lt;li&gt;One of the javascript files added is &lt;a href=&#34;http://www.prototypejs.org/&#34;&gt;prototype&lt;/a&gt;, a javascript framework which isn&#39;t compatible with jQuery. So you have to rewrite your javascript code to work in &amp;quot;No conflicts mode&amp;quot; if you want it to work with Tapestry.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No. Tapestry was clearly not built with an interface developer in mind. Why is it so hard for many web framework developers to just talk with people that work with HTML, CSS, and Javascript? Please ask us &lt;strong&gt;before&lt;/strong&gt; implementing stuff like the above. We&#39;ll gladly give you our viewpoint.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Interface developers and security</title>
            <link href="http://friendlybit.com/css/interface-developers-and-security/" rel="alternate" type="text/html" title="Interface developers and security" />
            <published>2009-01-24T00:30:44+01:00</published>
            <updated>2009-01-24T00:30:44+01:00</updated>
            <id>http://friendlybit.com/css/interface-developers-and-security/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">You live in a new era, when demanding that people register on your site is no longer enough. There&#39;s far too many other sites out that that you&#39;re already a...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/interface-developers-and-security/">
                &lt;p&gt;You live in a &lt;strong&gt;new era&lt;/strong&gt;, when demanding that people register on your site is no longer enough. There&#39;s far too many other sites out that that you&#39;re already a member of, you don&#39;t need another one. You need to trust people.&lt;/p&gt;
&lt;p&gt;You also want people to contribute to your sites with content somehow. Text is not enough, you want all kinds of &amp;quot;rich&amp;quot; content, and you want people to be able to place them how they want on your page. I mean, we live in a &lt;strong&gt;new era&lt;/strong&gt; after all.&lt;/p&gt;
&lt;p&gt;Problem is, this &lt;strong&gt;new era thingie talk&lt;/strong&gt; makes people forget the basics. Even though this is the future, and we&#39;re all bored with &amp;quot;just&amp;quot; hypertext, we can&#39;t allow random people to add HTML to our sites. Why? Ask myspace about the &lt;a href=&#34;http://namb.la/popular/tech.html&#34;&gt;Samy worm&lt;/a&gt; from 2005, a little piece of clever front-end code that took their servers flying. What did they do wrong? They tried to let untrusted people embed HTML on their profile pages.&lt;/p&gt;
&lt;p&gt;But they even had this clever filter, which cleaned the code first! Well, long story short, using a div with the style attribute set to a background image that points to a javascript url actually execute the javascript in IE6. Didn&#39;t think of that did you? So what about the fact that both IE6 and IE7 execute vbscripts in urls prefixed with &amp;quot;vbscript:&amp;quot;, just like with javascript. Didn&#39;t know that? Ohhh. Perhaps then you shouldn&#39;t be trying to let unknown people embed HTML on your site?&lt;/p&gt;
&lt;p&gt;Many of these security issues stem from the fact that ordinary well-educated computer scientists &lt;strong&gt;don&#39;t know enough about interface development&lt;/strong&gt;, HTML, CSS and javascript, and discount them as being something that &amp;quot;anyone&amp;quot; could do. &amp;quot;Even my aunt made this puppy site in like 3 days, how hard can it be?!&amp;quot;.&lt;/p&gt;
&lt;p&gt;I&#39;ve always thought that interface development have an undeserved reputation of being easier than &amp;quot;real programming&amp;quot;; something that you can let rookies work with, something that no &amp;quot;real&amp;quot; programmer would ever want. &amp;quot;No, I want to work with hard stuff, not that webby stuff&amp;quot;.&lt;/p&gt;
&lt;p&gt;If you are in a position where people actually think that, perhaps security could be the way to lift interface development to its proper status. So why not read up on &lt;a href=&#34;http://en.wikipedia.org/wiki/Cross-site_scripting&#34;&gt;Cross Site Scripting (XSS)&lt;/a&gt;, look at examples of vulnerabilities, and pick a couple of examples of &lt;a href=&#34;http://www.xssed.com/&#34;&gt;big sites that are vulnerable&lt;/a&gt;. While you&#39;re at it, why not read up on &lt;a href=&#34;http://en.wikipedia.org/wiki/Cross-site_request_forgery&#34;&gt;Cross-site request forgery (CSRF)&lt;/a&gt; too?&lt;/p&gt;
&lt;p&gt;These are real issues that &lt;strong&gt;someone&lt;/strong&gt; needs to take into account when building websites. My guess is that the fancy computer scientists will have a very long way to go before grasping this stuff. &amp;quot;Why does IE6 parse &#39;java   script:&#39; as if there where no space in the middle?&amp;quot;. You know who&#39;s not surprised? Every damn interface developer out there.&lt;/p&gt;
&lt;p&gt;So. Go out there, and teach them silly math people how it&#39;s done, and what your HTML, CSS and javscript-knowledge is worth. Show them that logic isn&#39;t the way we do things around here, that anything can happen when IE6 boots. And… whatever you do… think very hard before letting people embed HTML on your site.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">HTML includes</title>
            <link href="http://friendlybit.com/html/html-includes/" rel="alternate" type="text/html" title="HTML includes" />
            <published>2008-11-29T15:18:49+01:00</published>
            <updated>2008-11-29T15:18:49+01:00</updated>
            <id>http://friendlybit.com/html/html-includes/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">One of the first questions beginners ask when starting to learn HTML is how to do includes. They seldom know that includes is what they are asking about,...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/html-includes/">
                &lt;p&gt;One of the first questions beginners ask when starting to learn HTML is &lt;a href=&#34;http://www.google.com/search?q=include+html&#34;&gt;how to do includes&lt;/a&gt;. They seldom know that includes is what they are asking about, but instead feels bad when having to copy and paste that same menu HTML each time they want a new page. &amp;quot;Do I have to type the same thing over and over?&amp;quot;.&lt;/p&gt;
&lt;p&gt;After asking friends how to solve the problem they get the answer that they now have to learn PHP. Or ASP. Or JSP. Or some other strange language they don&#39;t need. And install this thing here, and that thing there. What does your server host support? Oh, no, you need to configure stuff better. No, that setting is insecure… You know the drill, I&#39;m sure you&#39;ve walked someone through it sometime.&lt;/p&gt;
&lt;p&gt;So, a way to include a piece of HTML into a random page would clearly benefit beginners learning HTML. But that&#39;s not all:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Browsers would be able to cache&lt;/strong&gt; components of a page, and therefor load new pages using common components faster.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Less work learning new template languages&lt;/strong&gt; just to find that language X does not have a way to include things.&lt;/li&gt;
&lt;li&gt;Possible to learn componentization by &lt;strong&gt;looking at existing sites&lt;/strong&gt; and learn from them. This is an area we need to be better in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easy to make fallbacks&lt;/strong&gt; by linking directly to the corresponding HTML snippet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, how would this be implemented? We need a tag that acts as a kind of include, so what about &lt;code&gt;&amp;lt;object&amp;gt;&lt;/code&gt;? Just point to the HTML file you want and voilá, it gets included. Since this is HTML it would work exactly the same across all server-side languages.&lt;/p&gt;
&lt;p&gt;Luckily, this is already in the HTML5 spec. At the &lt;a href=&#34;http://www.whatwg.org/specs/web-apps/current-work/#the-object-element&#34;&gt;bottom of the object specification&lt;/a&gt;. Interestingly, I found it &lt;strong&gt;after&lt;/strong&gt; writing this article… Great minds think alike :)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In this example, an HTML page is embedded in another using the &lt;a href=&#34;http://www.whatwg.org/specs/web-apps/current-work/#the-object-element&#34;&gt;object&lt;/a&gt; element.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;figure&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;object&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;clock.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;figcaption&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;My HTML Clock&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;figcaption&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;figure&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Good! And it even seems to work in current browsers (&lt;a href=&#34;#comment-31225&#34;&gt;Thanks Siegfried&lt;/a&gt;). I&#39;ve tested it in Firefox, Opera, and Safari, and it works the same in all of them. Internet Explorer 6, 7, 8 (beta 2) just ignores it altogether.&lt;/p&gt;
&lt;p&gt;The problem is, the current implementation is to handle them just like iframes. And there&#39;s of course lots of problems with that approach:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Currently, an object element without a height and width gets rendered as a &lt;strong&gt;300 x 150 pixel block&lt;/strong&gt;. There is no reason whatsoever to do this when including HTML. This must change for this to be usable.&lt;/li&gt;
&lt;li&gt;The included HTML needs to be &lt;strong&gt;stylable&lt;/strong&gt; with the CSS rules on the page it&#39;s included from. Currently, this does not work, included HTML is treated as an iframe. Must be changed if this is to be usable.&lt;/li&gt;
&lt;li&gt;Are HTML components full HTML pages? Do they include a doctype and a &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, and do those get included? I assume only HTML &lt;strong&gt;inside &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; gets included&lt;/strong&gt; in the new page. No CSS. No JS linked to in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Clicking links inside included HTML should be handled as if the HTML was on the current page. This follows the same concept as if the HTML was included in the server side, and is needed if this is ever going to be used for a menu.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, what do you think, is this a good idea? Personally, I&#39;m hoping more concepts from template languages start to move into HTML.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Thanks to the comments (thanks zcorpan) I now have found exactly the above in HTML5. It&#39;s called &lt;code&gt;&amp;lt;iframe seamless&amp;gt;&lt;/code&gt;. It meets all the points in my list, and I&#39;m now really looking forward to the first implementation.&lt;/p&gt;
&lt;/blockquote&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Templated User Controls in ASP.NET</title>
            <link href="http://friendlybit.com/other/templated-user-controls-in-aspnet/" rel="alternate" type="text/html" title="Templated User Controls in ASP.NET" />
            <published>2008-11-18T01:28:43+01:00</published>
            <updated>2008-11-18T01:28:43+01:00</updated>
            <id>http://friendlybit.com/other/templated-user-controls-in-aspnet/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Good design repeats itself. It works hard to convey a whole, a feeling of consistency. Once you understand a part of such a design, you know your way around...</summary>
            <content type="html" xml:base="http://friendlybit.com/other/templated-user-controls-in-aspnet/">
                &lt;p&gt;Good design repeats itself. It works hard to convey a whole, a feeling of consistency. Once you understand a part of such a design, you know your way around all of it. This is often done by repetition, using the same elements, colors, styles, positioning, and so on. This is a good thing.&lt;/p&gt;
&lt;p&gt;Good code &lt;a href=&#34;http://en.wikipedia.org/wiki/Don%27t_repeat_yourself&#34;&gt;never repeats itself&lt;/a&gt;. The number of techniques to avoid it are numerous, and all new languages compete in trying to remove as much repetition as possible (Especially the dynamic ones).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Good design repeats itself, good code does not.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With interface development, you &lt;strong&gt;face the conflict&lt;/strong&gt; above over and over again. You get a design that (rightly) reuses the same concepts over and over, and you need to implement them in code that makes you write the same logic only once. This same time both when writing the code and later when fixing bugs in it, and deep inside, all programmers know that it&#39;s the correct way to do things.&lt;/p&gt;
&lt;p&gt;I&#39;m currently working in a .NET project (EPiServer CMS 5), and is faced with a design that uses the same kind of boxes all over the site. The boxes only differ by color and content, so things like shadows and rounded corners are clear repetition that I want to do only once. I&#39;ll do the shadows and corners with CSS, but for that I need a couple of wrapper divs. Divs that I only want to specify once, and then reuse.&lt;/p&gt;
&lt;p&gt;The prequisites are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I want a &lt;strong&gt;flexible&lt;/strong&gt; solution, so I&#39;m not tied to a specific HTML structure (number of divs, or even if I use the div tag or not).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No HTML in properties&lt;/strong&gt; that get sent to user-controls&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No HTML in code-behind&lt;/strong&gt; (a common way in .NET to split logic (code-behind) and templates (ASP.NET and HTML))&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;What I came up with was &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/36574bf6.aspx&#34;&gt;templated user controls&lt;/a&gt;. They provide a way to write controls that wrap any other controls you may have, and add content around them. And it&#39;s easy to write and user. This is how the one I wrote is used:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;ASPX-CS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;MyProject:Box&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;runat=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;Contents&amp;gt;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Random&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;header...&lt;span class=&#34;nt&#34;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;asp:Repeater&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;runat=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;...&lt;span class=&#34;nt&#34;&gt;&amp;lt;/asp:Repeater&amp;gt;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;...
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/Contents&amp;gt;&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;&amp;lt;/MyProject:Box&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It simply wraps anything inside it (in this case a heading tag and a asp repeater), and lets me do whatever I want with them. In my case, I wanted to add some generic HTML around lots of different content, but you could do anything you wanted.&lt;/p&gt;
&lt;p&gt;This is how the above was implemented. First the code-behind:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSHARP&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;System.Web.UI&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;namespace&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;MyProject.templates.units&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;[ParseChildren(true)]&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;partial&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;Box&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Web&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;UI&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;UserControl&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;private&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ITemplate&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;contents&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;[TemplateContainer(typeof(TemplateControl))]&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;[PersistenceMode(PersistenceMode.InnerProperty)]&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;[TemplateInstance(TemplateInstance.Single)]&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ITemplate&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Contents&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;get&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;                &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;contents&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;set&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;                &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;contents&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Page_Init&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;contents&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;                &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;contents&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;InstantiateIn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PlaceHolder1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;… and then the &amp;quot;code-front&amp;quot;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;ASPX-CS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;%@&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Control&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Language&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;C#&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AutoEventWireup&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CodeBehind&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Box.ascx.cs&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Inherits&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;MyProject.templates.units.Box&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;%&amp;gt;&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;class=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;box&amp;quot;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;class=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;boxwrapper&amp;quot;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;asp:Placeholder&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;runat=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;na&#34;&gt;ID=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;PlaceHolder1&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I think this is a &lt;strong&gt;really useful&lt;/strong&gt; way to write user controls, especially for those of you that work as interface developers in a .NET world. Asking the people around me I found that quite a few didn&#39;t know how templated user controls worked, so I hope I will be of use to some of you out there. Happy coding!&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Don’t waste time writing HTML and CSS</title>
            <link href="http://friendlybit.com/css/dont-waste-time-writing-html-and-css/" rel="alternate" type="text/html" title="Don’t waste time writing HTML and CSS" />
            <published>2008-07-10T00:02:50+02:00</published>
            <updated>2008-07-10T00:02:50+02:00</updated>
            <id>http://friendlybit.com/css/dont-waste-time-writing-html-and-css/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">When you&#39;ve worked with front-end development for a while, you start thinking about effectiveness. So without further ado, here&#39;s my four best ways to be a...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/dont-waste-time-writing-html-and-css/">
                &lt;p&gt;When you&#39;ve worked with front-end development for a while, you start thinking about effectiveness. So without further ado, here&#39;s my four best ways to be a more effective front-end developer. Feel free to add more ideas as comments!&lt;/p&gt;
&lt;h2 id=&#34;1-do-you-need-html-or-css-for-this&#34;&gt;1. Do you need HTML or CSS for this?&lt;a href=&#34;#1-do-you-need-html-or-css-for-this&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Lots of times when I get stranded on hard problem and sit back, I realize that I really &lt;strong&gt;shouldn&#39;t be trying to use CSS to solve all layout problems&lt;/strong&gt;. Assuming a rounded corner box will have to scale in all directions (up to 8 images!), when it really is fixed width and height (1 image), is an indescribable waste of everyone&#39;s time. Look closely at the design you&#39;re trying to implement: does it really have to be as flexible and scalable as you think? Shifting to that mindset saves me hours of work per day.&lt;/p&gt;
&lt;p&gt;One thing that many developers forget is that not all designers care for exact pixels. If something is really hard to develop, walk over to their table and suggest a change. You&#39;ll soon start to notice that designers are real people too, and that they have as much flexibility as you do. It&#39;s just as easy to call them up, so don&#39;t let shyness waste your time.&lt;/p&gt;
&lt;h2 id=&#34;2-try-to-set-properties-once&#34;&gt;2. Try to set properties once&lt;a href=&#34;#2-try-to-set-properties-once&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you know you have to do something (see above), try to &lt;strong&gt;do things once&lt;/strong&gt;. This is really tricky in both HTML and CSS, languages that have no variables, and generally makes code reuse a pain. But it is possible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;With CSS&lt;/strong&gt;; set widths of elements once, and trust inner elements to fill their parent. That&#39;s the default behavior of block level elements, and you can set display: block, or width: 100% on most other elements. Don&#39;t set heights at all if you can avoid them, and let elements expand to fill their containers. Combine similar CSS selectors to avoid typing things twice, and make new ones for common properties when few properties differ. Use floats and clearing instead of absolute positioning, and you&#39;ll won&#39;t have to micromanage positions all the time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;With HTML&lt;/strong&gt;, make sure that you really know the template language. I&#39;ve fighted with ASP.NET, JSP, JSTL, Smarty, WordPress Themes, RHTML, and Django&#39;s Templating Language, and now know enough about all of them to be productive. You should never have to type the same structure out twice, even in HTML. If your template language have loops, if-clauses and includes you really have no excuse to copy large chunks of HTML around. Refactor your HTML and make your own life easy.&lt;/p&gt;
&lt;h2 id=&#34;3-learn-your-text-editor&#34;&gt;3. Learn your text editor&lt;a href=&#34;#3-learn-your-text-editor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When code reuse isn&#39;t possible, &lt;strong&gt;use search/replace&lt;/strong&gt; in your favorite text editor.&lt;/p&gt;
&lt;p&gt;Replacing all instances of one HTML tag name with another is about replacing &amp;quot;element&amp;gt;&amp;quot; with &amp;quot;element2&amp;gt;&amp;quot; (without the opening bracket). That way you replace both opening and ending tags at once. Check to see if your editor supports regular expressions in its search/replace tool. If it does you can save lots of time by learning it. Matching a HTML tag is &amp;quot;&amp;lt;[^&amp;gt;]+&amp;gt;&amp;quot;, a starting angel bracket, one or more non-brackets, followed by an ending angel bracket. Naive regexps can make you match the starting bracket of one tag and the end of another, which makes for a mess.&lt;/p&gt;
&lt;p&gt;There&#39;s lots of little tricks like that, if you learn them you save massive amounts of time.&lt;/p&gt;
&lt;h2 id=&#34;4-make-sure-your-environment-supports-you&#34;&gt;4. Make sure your environment supports you&lt;a href=&#34;#4-make-sure-your-environment-supports-you&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There&#39;s more than the text editor that you have to work with. One essential part of front-end development is trial and error. It sounds silly but no matter what your skill is, sometimes you must resort to trying and testing your way to a solution. With HTML and CSS, this means being able to &lt;strong&gt;quickly make a change, switch window, and see that change in the browser&lt;/strong&gt;. If that cycle takes more that 5 seconds, you&#39;re losing valuable time.&lt;/p&gt;
&lt;p&gt;Don&#39;t use a virtual machine (even if it&#39;s only for IE6) that you can&#39;t quickly Alt-Tab out of. If you&#39;re stuck using one, you need to have the text editor on that machine too. It&#39;s worth your time fixing it.&lt;/p&gt;
&lt;p&gt;Don&#39;t accept build processes that makes you wait more than 5-10 seconds before you see your changes. With trial and error coding you will then waste 50% of your capacity doing nothing. Most often you can bypass this by copying just the HTML and CSS to the right place, without touching other source-code. I&#39;ve managed to do this in all kinds of crappy environments, and it&#39;s always worth it.&lt;/p&gt;
&lt;p&gt;So.&lt;/p&gt;
&lt;p&gt;I hope some of the above can help you save some time each day. The little things add up you know. What&#39;s your best time-saver?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Sharepoint 2007 – insanely bad HTML</title>
            <link href="http://friendlybit.com/html/sharepoint-2007-insanely-bad-html/" rel="alternate" type="text/html" title="Sharepoint 2007 – insanely bad HTML" />
            <published>2008-06-07T01:42:51+02:00</published>
            <updated>2008-06-07T01:42:51+02:00</updated>
            <id>http://friendlybit.com/html/sharepoint-2007-insanely-bad-html/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Sharepoint 2007 continues to amaze me with its terrible interface code. This is code you stumble over all over the place, both in places where you can hack...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/sharepoint-2007-insanely-bad-html/">
                &lt;p&gt;Sharepoint 2007 continues to amaze me with its terrible interface code. This is code you stumble over &lt;strong&gt;all&lt;/strong&gt; over the place, both in places where you can hack your way around them, and in places where you just have to live with them. Some things are very hard to live with, let me show you:&lt;/p&gt;
&lt;p&gt;ASP.NET developers made a decision once to include some hidden form fields, called viewstate, on all aspx pages. When deciding how to include those fields they chose an input with the type set to hidden. When the Sharepoint developers wanted to do something similar they decided on another route:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;__spDummyText1&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;display:none;&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;size&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;1/&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;__spDummyText2&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;display:none;&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;size&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;1/&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So we have a visible textbox, hidden with CSS, that has a size of 1 character. No wait, we have two textboxes and they both have very descriptive names (NOT). What the heck were they thinking? Why not type=&amp;quot;hidden&amp;quot;, and remove size? Or, I know, don&#39;t add them at all, they are only dummy right? Note that they are empty.&lt;/p&gt;
&lt;p&gt;Another strange interface decision is the one to include a skiplink in the page. Skip links are links that help screen readers (and others) to navigate to important areas quickly. There&#39;s many different ways to implement them, here&#39;s the Sharepoint way:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;A&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;javascript:;&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;onclick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;javascript:this.href=&amp;#39;#mainContent&amp;#39;;&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;ms-skip&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The .ms-skip class positions it far off screen to the left, and the javascript… wait, javascript on a skip link? Why on earth did they not add #mainContent to the href attribute directly? Only they know…&lt;/p&gt;
&lt;p&gt;Next in this post is a more philosophical piece of HTML. Look at this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;dir&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;none&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;...&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I&#39;ve heard about setting text direction to rtl (right to left), and ltr (left to right, for some eastern languages), but never to none. Where do text go that has no direction? Inwards? And what about having a table inside a span element?&lt;/p&gt;
&lt;p&gt;ASP.NET also have user controls, a way to abstract out important pieces of code, to make reuse easy. Sharepoint of course uses this convenient tool regularly, and comes with a couple of useful ones:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;SharePoint:SPRememberScroll&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;runat&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;TreeViewRememberScroll&amp;quot;&lt;/span&gt;
&lt;span class=&#34;na&#34;&gt;onscroll&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;javascript:_spRecordScrollPositions(this);&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;overflow:&lt;/span&gt;
&lt;span class=&#34;s&#34;&gt;auto;height: 400px;width: 150px; &amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; ...
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In the &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.sprememberscroll.aspx&#34;&gt;documentation for SPRememberScroll&lt;/a&gt; you can learn… absolutely nothing about it. It seems to strangely interact with a TreeView somehow, and even worse, it has a width and height! I guess it&#39;s good that it&#39;s separate from the TreeView itself, so we can remove it from there if we want to forget where we&#39;ve scrolled to. What?&lt;/p&gt;
&lt;p&gt;Sharepoint 2007, note the year there, also both have the classical spacer gif and a new one; the spacer span:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Spacer gif:
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;4px&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;IMG&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;SRC&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/_layouts/images/blank.gif&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;4&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;alt&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
Spacer span: &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;width: 3px; height: 5px;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Starting with the spacer gif: Luckily they have their width set twice, both on the image and the cell. Note the &amp;quot;4px&amp;quot; there, you can&#39;t use CSS units when you&#39;re writing HTML, HTML only knows about pixels. You&#39;re glad you wrote the width twice now, right? The spacer span is a fairly new thing I guess, the strange thing here is that you can&#39;t set a width and height on inline elements. It just doesn&#39;t work, sorry.&lt;/p&gt;
&lt;p&gt;If you&#39;ve built your user controls really bad, you might need a way to let people customize its HTML to make sense. Sharepoint has a couple of different ways to do this, one that they use themselves like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;SharePoint:DelegateControl&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;runat&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;ControlId&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;PublishingConsole&amp;quot;&lt;/span&gt;
&lt;span class=&#34;na&#34;&gt;PrefixHtml&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;mpdmconsole&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;ms-consolemptablerow&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;&amp;quot;
SuffixHtml=&amp;quot;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;&amp;quot;&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you manage to read that, you can see that they are injecting a table row somewhere inside their control (which of course generates a table). Is it just me that feels the urge to add an ending table tag to SuffixHtml just to see what happens?&lt;/p&gt;
&lt;p&gt;Another truly interesting interface construct is the datepicker. It&#39;s one of these ordinary little calendar icons that opens in a little box and lets you pick a date. How did the Sharepoint guys (or girls) implement that?&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;...A&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;#&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;onclick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;clickDatePicker(&amp;lt;long id here&amp;gt;, &amp;lt;long url here&amp;gt;, &amp;quot;&amp;quot;); return false;&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;IMG&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/_layouts/images/calendar.gif&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;border&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;alt&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Select a date from the calendar.&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;IMG&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;A&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;IFRAME&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;SRC&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/_layouts/images/blank.gif&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;FRAMEBORDER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;SCROLLING&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;no&lt;/span&gt;
&lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;DISPLAY:none;POSITION:absolute; width:200px; Z-INDEX:101;&amp;quot;&lt;/span&gt;
&lt;span class=&#34;na&#34;&gt;title&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Select a date from the calendar.&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;IFRAME&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;...
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Ok, lots of code to analyse here, and I&#39;ve still only cut out the middle of a couple of nested tables. A link with an onclick that opens the datepicker is fairly standard, all parameters needed are encoded into a long url sent to that method. There&#39;s an image to click, with a strange img ending tag, but that could have been a mistake. The strange thing here is the iframe that points to a blank image. It&#39;s inserted into a table right &lt;strong&gt;between&lt;/strong&gt; two cells (yes, you read that right). That&#39;s just insane. If you for some sensational reason have to use an iframe to display some HTML, output it javascript instead of just setting the src with js. Seriously people. Nice accessibility feature though, to have the alt text both on the image and on the iframe. Twice as accessible!&lt;/p&gt;
&lt;p&gt;Another not-so-fine interface implementation is the following: They want to show a heading and a list of links. Personally, I would have used a heading tag, and an ul with links in. Sharepoint does it like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/files/headingandlist.png&#34; alt=&#34;Black heading, list items with yellow dot before&#34; /&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;margin-left: 4px;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;level-header&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;header&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;headertitle&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Division&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;level-item-pos level-item level-bullet&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;header&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;lt;url&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Information Technology&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;level-item-pos level-item level-bullet&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;header&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;lt;url&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Research &lt;span class=&#34;err&#34;&gt;&amp;amp;&lt;/span&gt; Development&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
...
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;They break their own scheme of prefixing all their classes with &amp;quot;ms-&amp;quot; (something that severely messed up my header), they repeat ids, they use only divs and spans, and inline styles.&lt;/p&gt;
&lt;p&gt;Do I need to say more? Want to spread the word? &lt;a href=&#34;http://www.reddit.com/info/6mepf/comments/&#34;&gt;Vote on reddit&lt;/a&gt;.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Web standards with ASP.NET</title>
            <link href="http://friendlybit.com/html/web-standards-with-aspnet/" rel="alternate" type="text/html" title="Web standards with ASP.NET" />
            <published>2008-05-17T11:46:33+02:00</published>
            <updated>2008-05-17T11:46:33+02:00</updated>
            <id>http://friendlybit.com/html/web-standards-with-aspnet/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Good interface code is a mix of CSS and HTML, and while most frameworks offer full control over the CSS, they rarely offer that for HTML. This article looks...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/web-standards-with-aspnet/">
                &lt;p&gt;Good interface code is a mix of CSS and HTML, and while most frameworks offer full control over the CSS, they rarely offer that for HTML. This article looks at how ASP.NET developers can help their interface developers gain that control. Disclaimer: I&#39;m no .NET expert, but too few people write about this stuff, so I&#39;ll make a try.&lt;/p&gt;
&lt;h2 id=&#34;controls-that-keep-the-html-customizable&#34;&gt;Controls that keep the HTML customizable&lt;a href=&#34;#controls-that-keep-the-html-customizable&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Splitting pages into &amp;quot;controls&amp;quot; is a common way to build sites in ASP.NET. There&#39;s lots of different kinds of controls available, and I can&#39;t list all of them or name their differences. But I know I don&#39;t want to compile a .cs file every time a change some HTML. That pretty much rules out anything but &lt;strong&gt;user controls&lt;/strong&gt; (as far as I know, but any kind of control that fills the above requirements would do). User controls have two sides, one for C# code (code-behind), and one for tags (HTML and calls to other controls).&lt;/p&gt;
&lt;p&gt;There&#39;s also the issue of built-in stuff. ASP ships with many pre-built controls that help developers push out things quickly, the problem is that almost all of them neglect the HTML (DataList, GridView, …). They only allow setting a few properties, sometimes a CSS class, and assume that&#39;s OK. It isn&#39;t. I need full control over both the CSS and the HTML to be productive. There&#39;s one tag in particular is built with my kind of mindset, and that&#39;s the &lt;strong&gt;Repeater&lt;/strong&gt;. A repeater is used like a for loop, but outputs no HTML itself. Instead it allows you to specify some code to output before the loop, inside the loop, every other step, and afterwards. That goes a long way, and that&#39;s often enough. If the predefined templates are insufficient, like if you want the last item to be rendered differently, you&#39;re out of luck.&lt;/p&gt;
&lt;p&gt;I think I agree with the &lt;a href=&#34;http://forums.asp.net/p/1239961/2263220.aspx&#34;&gt;MVC Framework guys&lt;/a&gt; in how to solve missing parameters of default controls and bad output: Use C# code inside your templates. Why is this different than the spaghetti code of old ASP? Because you only use layout related logic, nothing else. People tend to think mixing C# and HTML looks messy, but isn&#39;t it stranger to make two very different things look the same?&lt;/p&gt;
&lt;p&gt;There&#39;s also tags like asp:hyperlink, asp:label, and so on; tags that essentially does exactly the same as the HTML they&#39;re hiding. Please don&#39;t use them, there&#39;s no abstraction layer needed for HTML.&lt;/p&gt;
&lt;h2 id=&#34;dont-repeat-yourself-not-even-in-the-interface&#34;&gt;Don&#39;t repeat yourself - not even in the interface code&lt;a href=&#34;#dont-repeat-yourself-not-even-in-the-interface&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Often when developers move from writing C# code to writing interface code they throw their coding skill out the window. You never copy a C# method just to make it output a different number - you make that number a parameter to the method instead. In the same way, you should never copy a piece of HTML from one place to another - move that code to a common masterpage or usercontrol instead. I&#39;ve seen this many times, even from experienced developers. Never copy code, it makes for nightmare maintainance.&lt;/p&gt;
&lt;p&gt;Also, use nested masterpages. So if you have three pages you need to build, and they have some code in common, you break that common code our into a masterpage. If two of the pages have even more in common you break that out into another masterpage, and let that one use the first one you made. Each Aspx page should only contain what makes it different from the other pages! Repeated HTML can also come in the form of small snippets of code, maybe 10 lines. You might not be able to break that out into a masterpage because it shows up all over the place. For those cases, break the snippet out into a usercontrol instead, and call that. Simple, and DRY.&lt;/p&gt;
&lt;h2 id=&#34;disable-viewstate&#34;&gt;Disable viewstate&lt;a href=&#34;#disable-viewstate&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;HTTP is by default stateless. That means that each HTTP request to the server knows nothing about all the other requests made. For scalability and performance, that&#39;s a great thing. By default, ASP.NET makes web development stateful. Every form field you fill out gets saved into a hidden form field, called viewstate, and sent with every request. But I&#39;m not talking about performance here, I&#39;m talking about interface development:&lt;/p&gt;
&lt;p&gt;To be able to save state across requests there&#39;s a hidden form field, and to be able to send that with every request there needs to be a form covering &lt;strong&gt;all&lt;/strong&gt; your form fields. I can&#39;t help to think that handling statefulness in the HTML (the view) is the wrong place to do it. Aside from taking away some of my control over the HTML, it also has accessibility issues. JAWS, a popular screen reader, switch to a different reading mode when inside of forms, and while it&#39;s possible to get to all content inside a form, it&#39;s harder.&lt;/p&gt;
&lt;p&gt;So, start by &lt;a href=&#34;http://www.google.com/search?q=disable+viewstate&#34;&gt;disabling viewstate&lt;/a&gt; by default. If you must have it for a certain control, only enable it for that control.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;a href=&#34;#summary&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There&#39;s lots of stuff you can do to make the HTML look better with ASP.NET, and that&#39;s a good thing. The bad thing is that it isn&#39;t that way by default. Now get out of here and go build some good HTML :)&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Use formats instead of microformats</title>
            <link href="http://friendlybit.com/html/use-formats-instead-of-microformats/" rel="alternate" type="text/html" title="Use formats instead of microformats" />
            <published>2008-05-17T12:29:26+02:00</published>
            <updated>2008-05-17T12:29:26+02:00</updated>
            <id>http://friendlybit.com/html/use-formats-instead-of-microformats/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">The Semantic Web continues to break new ground, and Web 3.0 seems to be a term that people associate with it. In the backwaters of semantics, microformats...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/use-formats-instead-of-microformats/">
                &lt;p&gt;The &lt;a href=&#34;http://www.w3.org/2001/sw/&#34;&gt;Semantic Web&lt;/a&gt; continues to break new ground, and &lt;a href=&#34;http://en.wikipedia.org/wiki/Web_3&#34;&gt;Web 3.0&lt;/a&gt; seems to be a term that people associate with it. In the backwaters of semantics, microformats aims to develop standards to embed semantic information into XHTML. I can&#39;t help to think that&#39;s strange.&lt;/p&gt;
&lt;p&gt;One of the &lt;a href=&#34;http://microformats.org/about/&#34;&gt;principles of microformats&lt;/a&gt; is to &amp;quot;design for humans first, machines second&amp;quot;. Still, almost all formats are about adding span tags and class or rel attributes to existing XHTML. Humans will never see those, or benefit from them, unless there&#39;s some kind of machine parsing done on top. Microformats were first built by people working with the blog search engine &lt;a href=&#34;http://technorati.com/&#34;&gt;technorati&lt;/a&gt;, one of the reasons being to make it easier for technorati to aggregate data from those blogs. So machines it is.&lt;/p&gt;
&lt;p&gt;Thing is, if you&#39;re going to give information to machines, why not use &lt;a href=&#34;http://en.wikipedia.org/wiki/VCard&#34;&gt;vCard&lt;/a&gt; instead of the equivalent microformat &lt;a href=&#34;http://microformats.org/wiki/hcard&#34;&gt;hCard&lt;/a&gt;? hCard is just a translation of vCard into XHTML. vCards open in your e-mail program, allowing you to save the contact information there, hCards don&#39;t open anywhere. vCards are also just as easy (probably easier) to crawl and parse as microformats.&lt;/p&gt;
&lt;p&gt;So what I&#39;m saying is, &lt;strong&gt;could we please use real formats instead of microformats&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; This article was too fuzzy, so let me clarify: This discussion is about embedded formats vs. formats. The &amp;quot;vs.&amp;quot; come from the fact that lots of sites that implement microformats choose not to implement the corresponding format, which in some cases lead to people not being able to use the extra information.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Why the class name &#34;wrapper&#34; is so common</title>
            <link href="http://friendlybit.com/html/why-the-class-name-wrapper-is-so-common/" rel="alternate" type="text/html" title="Why the class name &#34;wrapper&#34; is so common" />
            <published>2008-04-30T15:06:27+02:00</published>
            <updated>2008-04-30T15:06:27+02:00</updated>
            <id>http://friendlybit.com/html/why-the-class-name-wrapper-is-so-common/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">We&#39;ve all heard about how bad it is to use &#34;left&#34; and &#34;yellow&#34; as class names and ids. If you name an element &#34;left&#34;, and then decide to move that element...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/why-the-class-name-wrapper-is-so-common/">
                &lt;p&gt;We&#39;ve all heard about how bad it is to use &amp;quot;left&amp;quot; and &amp;quot;yellow&amp;quot; as class names and ids. If you name an element &amp;quot;left&amp;quot;, and then decide to move that element to the right, you have to go through all your pages and change that name. Too much work.&lt;/p&gt;
&lt;p&gt;If you instead had called it &amp;quot;licenseAgreement&amp;quot;, you would have been better off. Right? Perhaps not. Because we&#39;re forgetting about CMS:es. Those often have some kind of templates, where you as an interface developer define how the HTML should look. But as a interface developer, you have no idea of what kind of content editors will put into your templates. A couple of clicks later your &amp;quot;semantic id&amp;quot; is wrong.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I think this is one of the reasons semantics hasn&#39;t gotten a hold of the CMS world&lt;/strong&gt;. CMS:es have no idea of what kind of content people will store in them. Their main business goal is to make something generic, that doesn&#39;t assume semantics.&lt;/p&gt;
&lt;p&gt;This is why &amp;quot;wrapper&amp;quot; is such a common class name.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">IE8 is back on the standards track</title>
            <link href="http://friendlybit.com/html/ie8-is-back-on-the-standards-track/" rel="alternate" type="text/html" title="IE8 is back on the standards track" />
            <published>2008-03-04T07:55:45+01:00</published>
            <updated>2008-03-04T07:55:45+01:00</updated>
            <id>http://friendlybit.com/html/ie8-is-back-on-the-standards-track/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Yesterday the Internet Explorer Team showed a big change in attitude. Listening to developer feedback about IE8, they changed their mind, and now IE8 will...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/ie8-is-back-on-the-standards-track/">
                &lt;p&gt;Yesterday the Internet Explorer Team showed a big change in attitude. Listening to &lt;a href=&#34;/css/ie8-and-doctype-switching/&#34;&gt;developer feedback about IE8&lt;/a&gt;, they &lt;a href=&#34;http://blogs.msdn.com/ie/archive/2008/03/03/microsoft-s-interoperability-principles-and-ie8.aspx&#34;&gt;changed their mind&lt;/a&gt;, and now IE8 will render standards mode pages using the latest and greatest it can offer.&lt;/p&gt;
&lt;p&gt;This is not only a sane way to approach standards, but it&#39;s also a way to say &amp;quot;We&#39;re listening and are open to change based on your feedback&amp;quot; (Although saying the reason is the new Interoperability standards and not user feedback is rather weak).&lt;/p&gt;
&lt;p&gt;This move is great for both for the web in general and for the Internet Explorer Team. Let there be celebration!&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Default HTML in Sharepoint 2007</title>
            <link href="http://friendlybit.com/html/default-html-in-sharepoint-2007/" rel="alternate" type="text/html" title="Default HTML in Sharepoint 2007" />
            <published>2008-02-26T00:27:33+01:00</published>
            <updated>2008-02-26T00:27:33+01:00</updated>
            <id>http://friendlybit.com/html/default-html-in-sharepoint-2007/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">As I&#39;ve said before, I&#39;ve been spending time with Sharepoint 2007 recently. The HTML it produces is really bad, and today I thought I show you just how bad....</summary>
            <content type="html" xml:base="http://friendlybit.com/html/default-html-in-sharepoint-2007/">
                &lt;p&gt;As I&#39;ve said before, I&#39;ve been &lt;a href=&#34;/css/sharepoint-2007-from-an-interface-developers-view/&#34;&gt;spending time with Sharepoint 2007&lt;/a&gt; recently. The HTML it produces is really bad, and today I thought I show you just how bad.&lt;/p&gt;
&lt;p&gt;Sharepoint 2007 has been &amp;quot;updated&amp;quot; to support &lt;a href=&#34;http://msdn2.microsoft.com/en-us/library/wtxbf3hh.aspx&#34;&gt;masterpages&lt;/a&gt;, a concept from .NET 2.0. Sharepoint&#39;s implementation of masterpages has several problems, but none of them even come close to the biggest problem of them all: default.master.&lt;/p&gt;
&lt;p&gt;Default.master is the page that ships with Sharepoint and is used everywhere by default. A quick glimpse at it would make any seasoned web developer feel sick, and I quickly replaced it with something homemade. If you keep reading you will see why. Let&#39;s get going with the first line:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;HTML&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;xmlns:o&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;urn:schemas-microsoft-com:office:office&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;dir&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;ltr&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;__expr-val-dir&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;ltr&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Things start out really bad, without a doctype on the first line. This mean that all default pages will render in &lt;a href=&#34;http://en.wikipedia.org/wiki/Quirks_mode&#34;&gt;quirks mode&lt;/a&gt;, making rendering unreliable across browsers. Next they set an XML namespace, which after some googling points to very &lt;a href=&#34;http://msdn2.microsoft.com/en-us/library/ms875215(EXCHG.65&#34;&gt;thorough documentation (pun intended)&lt;/a&gt;.aspx). So they mean that it&#39;s an XHTML document? No, because XHTML has lowercase tags, and here they use uppercase. The attribute &lt;span class=&#34;incorrect&#34;&gt;&lt;code&gt;__expr-val-dir&lt;/code&gt;&lt;/span&gt; just doesn&#39;t exist.&lt;/p&gt;
&lt;p&gt;A hardcoded link to the 4000 line &amp;quot;core.css&amp;quot; (filled with classnames you have to override by hand), and five external hardcoded javascripts then follow. Then 30 lines of inline CSS and javascript. Then comes the next real beauty, the body tag:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;BODY&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;scroll&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;yes&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;onload&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;javascript:&lt;/span&gt;
&lt;span class=&#34;s&#34;&gt;   if (typeof(_spBodyOnLoadWrapper) != &amp;#39;undefined&amp;#39;)&lt;/span&gt;
&lt;span class=&#34;s&#34;&gt;   _spBodyOnLoadWrapper();&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The funniest thing here is the scroll attribute. Let me paraphrase &lt;a href=&#34;http://html.com/attributes/body-scroll/&#34;&gt;html.com&lt;/a&gt; (found through quick googling):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SCROLL, which is only recognized by MSIE, indicates if there be scroll bars on the page. The default value is YES, so the only reason to use SCROLL is to set it to NO. SCROLL serves little purpose except to confuse and annoy readers by removing scroll bars which are there for a good reason.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I couldn&#39;t have said it better myself. There&#39;s no reason, whatsoever, to use the scroll attribute. Ever. Especially with &amp;quot;yes&amp;quot; set. &lt;em&gt;Pause for deep breaths&lt;/em&gt;. Then we have the inline javascript. Did you know that you could put javascript: inside of onload? Despite all odds, it seems to work. &lt;code&gt;_spBodyOnLoadWrapper()&lt;/code&gt; is by the way Sharepoint&#39;s way of letting you add javascript to pages. You first do a &lt;span class=&#34;incorrect&#34;&gt;&lt;code&gt;_spBodyOnLoadFunctionNames.push(&amp;quot;YourFunctionName&amp;quot;);&lt;/code&gt;&lt;/span&gt;, and then that code will get run. Insane.&lt;/p&gt;
&lt;p&gt;Then we have the typical ASP.NET form, encapsulating the whole page, followed by 18 hidden HTML fields (including the infamous viewstate). Directly afterwards, we have a 60 line mix of inline and external javascript, contained in 7 different code blocks (two that&#39;s missing the type and language attribute).&lt;/p&gt;
&lt;p&gt;The next discovery can be found three &lt;em&gt;nested tables&lt;/em&gt; later:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;TurnOnAccessibility&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;display: none&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
   &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;onclick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;SetIsAccessibilityFeatureEnabled(true);&lt;/span&gt;
&lt;span class=&#34;s&#34;&gt;   UpdateAccessibilityUI();return false;&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;#&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;ms-skip&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Turn on more accessible mode&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;onclick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;javascript:this.href=&amp;#39;#mainContent&amp;#39;;&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;javascript:;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
class=&amp;quot;ms-skip&amp;quot; AccessKey=&amp;quot;J&amp;quot;&amp;gt;Skip to main content&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;I&#39;ll wait until you regain consciousness. Hi, welcome back. Yes, they are using &lt;span class=&#34;incorrect&#34;&gt;&lt;code&gt;display: none&lt;/code&gt;&lt;/span&gt; and javascript calls to enable &amp;quot;accessibility mode&amp;quot;. I mean seriously, screen readers ignore things with display: none set, and we can certainly not always trust that javascript is enabled. I also love the skiplink, and how it sets its own href attibute to an internal link. Note how this code is (mostly) lowercase.&lt;/p&gt;
&lt;p&gt;And this is where it starts to get ugly. Every Sharepoint page has a Personal menu and a Site menu on it, containing things you want to do with your account or the current site. Fair enough. This is the (rather lengthy) code for the Personal menu:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;display:none&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;menu&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;ServerMenu&amp;#39;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;zz3_ID_PersonalActionMenu&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;largeIconMode&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ie:menuitem&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;zz4_ID_PersonalInformation&amp;quot;&lt;/span&gt;
      &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;option&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;iconSrc&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/_layouts/images/menuprofile.gif&amp;quot;&lt;/span&gt;
      &lt;span class=&#34;na&#34;&gt;onMenuClick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;javascript:GoToPage([url]);return false;&amp;quot;&lt;/span&gt;
      &lt;span class=&#34;na&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;My Settings&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;description&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Update your user information, regional settings, and alerts.&amp;quot;&lt;/span&gt;
      &lt;span class=&#34;na&#34;&gt;menuGroupId&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;100&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ie:menuitem&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      ... [three more &amp;quot;ie:menuitem&amp;quot;] ...
   &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;menu&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;title&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Open Menu&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;  &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;zz8_Menu_t&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;ms-SPLink ms-SpLinkButtonInActive&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;onmouseover&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;MMU_PopMenuIfShowing(this);MMU_EcbTableMouseOverOut(this, true)&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;hoverActive&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;ms-SPLink ms-SpLinkButtonActive&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;hoverInactive&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;ms-SPLink ms-SpLinkButtonInActive&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;onclick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot; MMU_Open(byid(&amp;#39;zz3_ID_PersonalActionMenu&amp;#39;), MMU_GetMenuFromClientId(&amp;#39;zz8_Menu&amp;#39;),event,false, null, 0);&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;foa&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;MMU_GetMenuFromClientId(&amp;#39;zz8_Menu&amp;#39;)&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;oncontextmenu&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;this.click(); return false;&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;nowrap&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;nowrap&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;zz8_Menu&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;accesskey&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;L&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;#&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;onclick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;javascript:return false;&amp;quot;&lt;/span&gt;
      &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;cursor:pointer;white-space:nowrap;&amp;quot;&lt;/span&gt;
      &lt;span class=&#34;err&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;five&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;more&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;eventhandlers&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;
      &lt;span class=&#34;na&#34;&gt;menuTokenValues&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;MENUCLIENTID=zz8_Menu,TEMPLATECLIENTID=zz3_ID_PersonalActionMenu&amp;quot;&lt;/span&gt;
      &lt;span class=&#34;na&#34;&gt;serverclientid&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;zz8_Menu&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
         Welcome Emil Stenström&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/_layouts/images/blank.gif&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;border&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;alt&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Use SHIFT+ENTER to open the menu (new window).&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;align&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;absbottom&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/_layouts/images/menudark.gif&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;alt&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;There&#39;s several things worth a note here (in a bad way). The menu tag Sharepoint uses is in fact a real HTML tag, &lt;a href=&#34;http://www.w3.org/TR/html401/struct/lists.html#h-10.4&#34;&gt;deprecated in HTML 4.01&lt;/a&gt;. Inside of that we have a tag called ie:menuitem that I really can&#39;t understand. What on earth is ie:menuitem? Did they intentionally not make it work in other browsers? Everything is wrapped inside a &lt;span class=&#34;incorrect&#34;&gt;&lt;code&gt;display: none;&lt;/code&gt;&lt;/span&gt; As you see, tags are also cluttered with event handlers, both real and made up ones. The contextmenu is blocked twice, and a spacer gif is used to add alternate text to the link. The menu icon is hardcoded into everything.&lt;/p&gt;
&lt;p&gt;It goes on in the same manner, with tables with the &amp;quot;TOPLEVEL&amp;quot; attribute (and no value), divs with a WebPartId set, PlaceHolder tags rendered directly out in the HTML (instead of parsed by ASP.NET), to end with 200 lines of mixed inline javascript and css. Everything embedded in several layers of nested tables.&lt;/p&gt;
&lt;h2 id=&#34;in-conclusion&#34;&gt;In conclusion&lt;a href=&#34;#in-conclusion&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Default.master contains the worst code I&#39;ve ever seen, and it&#39;s really disappointing to see that from a product with &amp;quot;2007&amp;quot; in it. Microsoft have failed in every possible way when it comes to the interface code, and I believe the only way out is to rebuild Sharepoint from scratch (not likely to happen). Having to work with Sharepoint is a real pain, and I honestly don&#39;t recommend it to anyone. Put your curiosity to use into something more interesting, like the &lt;a href=&#34;http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx&#34;&gt;ASP.NET MVC Framework&lt;/a&gt; instead. Thanks for listening.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">IE8 and Doctype switching</title>
            <link href="http://friendlybit.com/css/ie8-and-doctype-switching/" rel="alternate" type="text/html" title="IE8 and Doctype switching" />
            <published>2008-01-26T17:44:50+01:00</published>
            <updated>2008-01-26T17:44:50+01:00</updated>
            <id>http://friendlybit.com/css/ie8-and-doctype-switching/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">The topic of this week has been IE8s new rendering mode, and the strange way to trigger it. As usual, I&#39;ve decided not to comment right away, and instead...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/ie8-and-doctype-switching/">
                &lt;p&gt;The topic of this week has been IE8s new rendering mode, and the strange way to trigger it. As usual, I&#39;ve decided not to comment right away, and instead first read what others are saying and try to form an opinion.&lt;/p&gt;
&lt;p&gt;I believe the best articles that talks about the switch are these:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;http://www.b-list.org/weblog/2008/jan/23/legacy/&#34;&gt;Legacy&lt;/a&gt;, by &lt;span class=&#34;person-name&#34;&gt;James Bennet, puts this move in a bigger context. I believe his most important conclusion is that Microsoft are now clearly positioning themselves towards big old corporate intranets, reiterating &amp;quot;Don&#39;t break the web&amp;quot;.&lt;br /&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.andybudd.com/archives/2008/01/has_internet_ex/&#34;&gt;Has Internet Explorer Just Shot Itself in the Foot?,&lt;/a&gt; by Andy Budd, talks about how Microsoft marginalizes their own browser. Most people won&#39;t know about the switch, and end up in IE7 mode, so there&#39;s no real need for anyone to upgrade. IE7s rendering engine needs to be with us, forever.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://diveintomark.org/archives/2008/01/23/microsoft-koan&#34;&gt;Microsoft koan&lt;/a&gt;, by Mark Pilgrim, elegantly points out that strange code (unknown doctypes, including html5) will be rendered in standards mode, and ordinary code (proper doctype) will be rendered in IE7 mode. Seems twisted?&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;the-real-strangeness&#34;&gt;The real strangeness&lt;a href=&#34;#the-real-strangeness&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;What I can&#39;t understand in all of this is how IE7-specific sites can be such big of a problem. Because that what all of this fuss is really about. That&#39;s why we need a new switching mode and they need to ship the IE7 rendering engine with IE8.&lt;/p&gt;
&lt;p&gt;So, now there&#39;s a couple of different sites.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IE6 specific sites.&lt;/strong&gt; My guess is that these are the majority of sites out there. These will break as much in IE8 as they did in IE7. &amp;quot;Don&#39;t break the web&amp;quot; does not apply to these sites.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IE7 specific sites&lt;/strong&gt;. These are much fewer and got updated rather recently (badly, to work only in IE7). The new switch is there for these sites. With the switch these sites won&#39;t break.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sites built to the standards&lt;/strong&gt;. These were also updated rather recently, but unlike the above sites they were built to the standards. Fixes for IE6 and IE7 were properly only sent to just those browsers, and will &lt;em&gt;not&lt;/em&gt; be sent to IE8 (conditional comments anyone?). If you targeted IE7 with your conditional comment, IE8 will not get that fix, breaking these type of sites. Well, unless IE8 will execute IE7 conditional comments, when that engine does the rendering.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So let&#39;s look back at the previous articles, keeping in mind the IE team mantra: &amp;quot;&lt;em&gt;Don&#39;t break the web&lt;/em&gt;&amp;quot;, the very reason why this fix exists.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First article&lt;/strong&gt; (1): My guess is that many corporate intranets belong in the first group of sites. They haven&#39;t been updated in a while, and won&#39;t be either. This group of sites will be just as unhappy with IE8 as they were with IE7. This can&#39;t be about those sites. IE team mantra: &amp;quot;&lt;em&gt;Keep breaking the web just as much as we broke it before&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second article&lt;/strong&gt; (2): This switch will increase the number of sites in the IE7 specific group. This will be at the expense of the standards group. When a developer not knowing about the switch sees that his site works in IE7 and IE8 (which will be the same), he will stop working on it. IE team mantra: &amp;quot;&lt;em&gt;Freeze the web to IE7&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Third article&lt;/strong&gt; (3): Since unknown doctypes will send IE8 into standards mode, there will be even more breakage than before. What? Well, sites with broken doctypes, that previously sent IE6 and IE7 into quirks mode and relied on that, will break. IE Team mantra: &amp;quot;&lt;em&gt;Break the web&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;Additionally, modern developers that don&#39;t read the IE blog, and don&#39;t know about the new switch, will keep getting IE7s strange behaviour on their sites. And since the switch also can be made via a HTTP header, even copying the full HTML and CSS of a site might break it when looking at it locally. IE team mantra: &amp;quot;&lt;em&gt;Make people read our blog, or go insane trying to develop to the standards&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;h2 id=&#34;what-it-all-comes-down-to&#34;&gt;What it all comes down to&lt;a href=&#34;#what-it-all-comes-down-to&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is a terrible idea, both technically and in how it was presented. If the same idea had been presented in a more open manner, &amp;quot;&lt;em&gt;we&#39;re thinking about solving this problem like this… what do you think?&lt;/em&gt;&amp;quot;, people would have been much more willing to help, and had probably came up with a better solution.&lt;/p&gt;
&lt;p&gt;WaSP really acted badly by not first talking to the community, or at least discussing things internally, and instead just presented how IE8 will be built. Also, since this won&#39;t help developing standards based websites, and instead help IE7 specific sites, I&#39;m not sure what the WaSP has to do with this issue whatsoever.&lt;/p&gt;
&lt;p&gt;On the constructive side of things, I think the &lt;strong&gt;best way forward for IE8 is to change the switch to be opt-in, letting IE7 specific sites switch to IE7 rendering if they want to&lt;/strong&gt;. That&#39;s makes sure IE7 sites that break are easy to fix, and does not break havoc on the rest of the web. Don&#39;t set the default to worse rendering than you can produce.&lt;/p&gt;
&lt;p&gt;With the above change, I&#39;m looking forward to another modern web browser, IE8.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Sharepoint 2007 from an interface developer’s view</title>
            <link href="http://friendlybit.com/css/sharepoint-2007-from-an-interface-developers-view/" rel="alternate" type="text/html" title="Sharepoint 2007 from an interface developer’s view" />
            <published>2008-01-20T12:10:42+01:00</published>
            <updated>2008-01-20T12:10:42+01:00</updated>
            <id>http://friendlybit.com/css/sharepoint-2007-from-an-interface-developers-view/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Like Cameron Moll (Skinning Sharepoint and Pointedly unskinnable), I&#39;ve been working with Sharepoint 2007 (aka MOSS) recently, and I hope you don&#39;t mind me...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/sharepoint-2007-from-an-interface-developers-view/">
                &lt;p&gt;Like Cameron Moll (&lt;a href=&#34;http://cameronmoll.com/archives/2007/05/skinning_ms_sharepoint_with_st/&#34;&gt;Skinning Sharepoint&lt;/a&gt; and &lt;a href=&#34;http://cameronmoll.com/archives/2007/10/sharepoint_2007_pointedly_unskinnable/&#34;&gt;Pointedly unskinnable&lt;/a&gt;), I&#39;ve been working with Sharepoint 2007 (aka MOSS) recently, and I hope you don&#39;t mind me posting a few articles about my work here. I&#39;ve found far too few blog posts that really go to the depth in explaining how things really work. I&#39;ll try to do that here, but I hope you can respect my wish that this does not turn into a helpdesk.&lt;/p&gt;
&lt;h2 id=&#34;quotcustomizationquot&#34;&gt;&amp;quot;Customization&amp;quot;&lt;a href=&#34;#quotcustomizationquot&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Let&#39;s start. &lt;strong&gt;Sharepoint 2007 very, very hard to customize&lt;/strong&gt;. If your job is to customize the interface in any major way, you have a lot of work ahead of you. You might think you&#39;re a much better interface developer than me, but you still have a lot of work ahead of you. You need to accept that.&lt;/p&gt;
&lt;p&gt;When you read about Sharepoint 2007 on other sites you will find that people are really ecstatic about it. Just check the comments on how to &lt;a href=&#34;http://planetwilson.blogspot.com/2007/09/sharepoint-2007-colour-color-calendar.html&#34;&gt;customize the calendar&lt;/a&gt;. Reading carefully you will find that he&#39;s comparing it with Sharepoint 2003, not with other products, or even a standard ASP.NET site. That&#39;s a big difference. Sharepoint 2003 was much worse, but that does not mean things are good now. This is a common pattern, people that like Sharepoint compare it to the previous version, not with better ways of doing things.&lt;/p&gt;
&lt;p&gt;As most CMS:es, Sharepoint gets sold to customers that don&#39;t know programming. They see a product that can handle all the features they want: blogs, wikis, forums, calendars, document libraries, workflows, and so on. All features you could ever want is included, from what is called &amp;quot;out of the box&amp;quot;. The problem is that the system is built so that all of those &amp;quot;out of the box&amp;quot; features are hard to customize. Things like changing how the wiki renders, is really hard. Often it&#39;s easier to rebuild that feature from scratch, than customizing what Sharepoint ships.&lt;/p&gt;
&lt;p&gt;This is the main reason, from my point of view, that you should pick another CMS.&lt;/p&gt;
&lt;h2 id=&#34;specifics&#34;&gt;Specifics&lt;a href=&#34;#specifics&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I don&#39;t believe you trust me on my words, so I thought I&#39;d be more specific now, and talk about the issues that make Sharepoint 2007 hard to work with (customize). Let me stress that these are not all the issues, just the major ones that an interface developer has to tackle.&lt;/p&gt;
&lt;h3 id=&#34;development&#34;&gt;Development&lt;a href=&#34;#development&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;From what I&#39;ve read from larger projects, the recommended development environment for a Sharepoint site is a virtual machine. For us, we needed a 36 Gb image, a size that required me to get a new external hard drive, just to store it. Also, running in a virtual machine means that you only can use about half of your RAM, which means everything gets slow. As if that wasn&#39;t enough, a new virtual machine means you have to reinstall all your programs, browsers, plugins again. Web development shouldn&#39;t have to be like that.&lt;/p&gt;
&lt;h3 id=&#34;accessibility&#34;&gt;Accessibility&lt;a href=&#34;#accessibility&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Sharepoint has gotten a lot of bashing for not being accessible, so they&#39;ve added some features to account for that. Some of those are really good individually, but looking at the general mess that is the HTML that Sharepoint spits out, the pretty page above fades in importance. One major problem is that you still need &lt;strong&gt;javascript enabled&lt;/strong&gt; for many of the accessibility features. Enabling &amp;quot;Accessibility mode&amp;quot;, among other things, makes dropdown menus appear as new windows (popups) instead of dynamically writing HTML to the page. And this is after they &amp;quot;fixed&amp;quot; it.&lt;/p&gt;
&lt;h3 id=&#34;page-size&#34;&gt;Page size&lt;a href=&#34;#page-size&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A standard Sharepoint site uses lots of default Javascript and CSS in two files called core.js and core.css. All in all they add up to over 250 kb. Yes, that&#39;s not a misspelling or extra zero, a default page in sharepoint takes at least 250 kb. This is not counting the HTML, a huge, table-ridden, inline-javascripted, mess of things.&lt;/p&gt;
&lt;p&gt;If you go through lots of trouble, you can strip those files out, but that means you can&#39;t use any default components. Since much of Sharepoint depend on those, you don&#39;t really want to go that way. It&#39;s a mess, and Microsoft themselves recommend you try to &lt;a href=&#34;http://msdn2.microsoft.com/en-us/library/bb727371.aspx#MOSS2007OptPerfWCM_PagePayloadSmallisGood&#34;&gt;remove some of it&lt;/a&gt; to boost performance. Preferably by using AJAX to load the js file later. Seriously.&lt;/p&gt;
&lt;h3 id=&#34;javascript-and-browser-dependencies&#34;&gt;Javascript and Browser dependencies&lt;a href=&#34;#javascript-and-browser-dependencies&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Except from core.js, the javascript is spread out all over the place. As usual in many CMS:es, javascript is not treated as a real programming language, so there&#39;s no structuring whatsoever. Sometimes it&#39;s script tags, sometimes inline, sometimes external mini files, and most often automatically generated code. It&#39;s a real mess, and is a big reason for the HTML size being so large. Many of the scripts do not work in browsers other than IE, which means you really need IE to properly use the admin interface.&lt;/p&gt;
&lt;p&gt;From the browser compatability info you can read that there are level 1 and level 2 browsers:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;Level 2 web browsers support all of our basic functionality so that users can both read and write in our content sites, perform site administration, etc. Some functionality may not be available, some functionality may be available in a more limited form, and some visual rendering may not be as optimized as our Level 1 browsers. We also will not support Level 2 web browsers on the Central Administration site.&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These are the Level 2 browsers: Firefox, Netscape, Safari. Opera isn&#39;t even in the list. Is this the new, modern way, of handling cross browser compatibility?&lt;/p&gt;
&lt;h3 id=&#34;changing-the-css&#34;&gt;Changing the CSS&lt;a href=&#34;#changing-the-css&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I previously said that most CSS is included in a file called core.css. The file in itself if huge, with thousands of class names, and no structuring whatsoever. Heather Solomon has made an attempt to make things workable by &lt;a href=&#34;http://www.heathersolomon.com/content/sp07cssreference.htm&#34;&gt;making images of what each class specifies&lt;/a&gt;. It&#39;s not even nearly a complete reference, and helps some, but using &lt;a href=&#34;http://getfirebug.com/&#34;&gt;Firebug&lt;/a&gt; is a faster way. Another thing the CSS sheet above does, is show how completely unorganized the CSS is. Have a look at it.&lt;/p&gt;
&lt;p&gt;As with core.js you can&#39;t really remove core.css, since lots of built-in functionality depends on it. So what you need to do is start deciding which of those rules you need to overwrite and which not. Have fun!&lt;/p&gt;
&lt;p&gt;To add to the insult, if you just add your own CSS as an external file and try to link to that on your own pages, core.css is appended as the last stylesheet in the source code. This of course means that all your changes get overwritten, and you need to hack around things by using the &lt;link&gt; tag directly (instead of sharepoint&#39;s own csslink-control), or add your custom files via the admin interface. Since core.css is just a list of simple class names, you can also use &lt;a href=&#34;http://www.htmldog.com/guides/cssadvanced/specificity/&#34;&gt;CSS Specificity&lt;/a&gt; to make your rules count, but that isn&#39;t mentioned in any of the troubleshooting blog posts. None the less, it&#39;s tedious do work around.&lt;/p&gt;
&lt;h3 id=&#34;share-point-and-master-pages&#34;&gt;Share point and Master pages&lt;a href=&#34;#share-point-and-master-pages&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Most of Sharepoint is upgraded to use .NET 2.0, and its concept of Master pages and aspx pages. For those of you that don&#39;t develop in .NET the two can be explained as a templating mechanism, where each Master page has general placeholders where you can insert aspx pages. In each aspx page you specify one master page, and all of the placeholders you want to fill with content. It&#39;s a pretty good system.&lt;/p&gt;
&lt;p&gt;Sharepoint taps into this system by making up two strings &amp;quot;~masterurl/custom.master&amp;quot;, and &amp;quot;~masterurl/default.master&amp;quot;, that you use instead of specifying your own masterpages. Users then specify masterpages in the admin interface, potentially breaking the entire site. Also, Sharepoint assumes there&#39;s just one masterpage per site, so if you thought you could use one masterpage for twocolumn layouts, and another for threecolumn layouts, you&#39;re wrong. The solution here is to break out of the Sharepoint way and hardcode real urls instead of doing things the Sharepoint way.&lt;/p&gt;
&lt;p&gt;There&#39;s also things you can&#39;t change. The admin interface has a masterpage called application.master, which controls pretty much everything that has to do with built-in Sharepoint things. You don&#39;t ever change this file, since it&#39;s quite easy to seriously break things then. The problem is that this file also specify the look and feel of the admin interface, and if you&#39;re building a site where people are expected to add stuff, they will spend time in the admin interface. There isn&#39;t a good way around this, and you probably end up just changing some colors via CSS and let it be.&lt;/p&gt;
&lt;h3 id=&#34;default-net-controls&#34;&gt;Default .NET controls&lt;a href=&#34;#default-net-controls&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The default master pages that ship with Sharepoint is horrendous and I&#39;ll post more details about them in a later post. But even if you roll your own master pages from scratch you still have the standard .NET-problem with controls. Using controls in .NET is a way to package functionality that you can easily add to your pages. A developer just needs to copy a DLL file, and call the control, optionally sending in some parameters. Easy.&lt;/p&gt;
&lt;p&gt;The problem with this approach is that a control consists both of logic and HTML. So if you want some built-in logic that renders, say, the breadcrumb trail, you also get the HTML the author of the control deemed appropriate. In Sharepoint, a breadcrumb trail can be a doubly nested table, with display: none; controls to enable accessibility, and a doubly span nested link. It&#39;s just a terrible mess, but there&#39;s no other way to get to the breadcrumb logic, except from building a new control from scratch. Be prepared to work with terrible HTML.&lt;/p&gt;
&lt;h2 id=&#34;in-summary&#34;&gt;In summary&lt;a href=&#34;#in-summary&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you want to examine the points above by yourself, there&#39;s a MOSS example site up at &lt;a href=&#34;http://www.wssdemo.com/default.aspx&#34;&gt;wssdemo.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This article is a interface developer view at Sharepoint 2007. If you look at the system from other viewpoints, I&#39;m sure there are good things there. That&#39;s not my point. What I&#39;m trying to say is that &lt;strong&gt;Sharepoint 2007, is beyond repair when it comes to interface customization&lt;/strong&gt;, and you should do everything in your power to avoid working with it. If I can give one interface developer the arguments to convince a customer to pick another system, this article was worth it. Thanks for reading.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">I’m an interface developer</title>
            <link href="http://friendlybit.com/css/im-an-interface-developer/" rel="alternate" type="text/html" title="I’m an interface developer" />
            <published>2007-08-20T23:17:55+02:00</published>
            <updated>2007-08-20T23:17:55+02:00</updated>
            <id>http://friendlybit.com/css/im-an-interface-developer/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">In his latest post Roger Johansson asks the question Are we designers or developers?. I have a simple answer for that. None of them. Let me explain: First...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/im-an-interface-developer/">
                &lt;p&gt;In his latest post Roger Johansson asks the question &lt;a href=&#34;http://www.456bereastreet.com/archive/200708/are_we_designers_or_developers/&#34;&gt;Are we designers or developers?&lt;/a&gt;. I have a simple answer for that. &lt;strong&gt;None of them&lt;/strong&gt;. Let me explain:&lt;/p&gt;
&lt;p&gt;First we have these people calling themselves &lt;strong&gt;developers&lt;/strong&gt;. And boy do they know programming… and math… and… no that&#39;s all. Many have a masters degree in computer science, a degree that pretty much tells you that they once gave five years of their lives to programing, how cool is that!? It&#39;s not unusual to find people that &lt;a href=&#34;http://xkcd.com/55/&#34;&gt;think in those terms&lt;/a&gt; too. You can recognize them by their 10 year old, unmatched, clothes and you&#39;ll rarely talk more than 1 minute with them. Very efficient.&lt;/p&gt;
&lt;p&gt;Then we have the &lt;strong&gt;designers&lt;/strong&gt;. Either real females, or people very close to females, that just can&#39;t stop talking about this abstract thingie-thongie that just like, you know, exploded in a big burst of colors and like… &amp;quot;EHEM! Sorry!&amp;quot;, you hear them say, regaining consciousness and flying back to earth. Their clothes, at least you think they are clothes, often look like they where meant for something else. Perhaps for building steel pumps, or killing animals… or both. Well, at least these clothes are matched… or very purposefully not at all matched (not at aaaall like the developers). You can talk with these people for hours, probably even days, and still only touch upon the delicate topic of &amp;quot;a glass of water&amp;quot;. Oh, and they &amp;quot;create&amp;quot; things too. Very deep.&lt;/p&gt;
&lt;p&gt;So where the heck does the &lt;strong&gt;interface developer&lt;/strong&gt; come into all of this? Well, imagine you have a real project at hand. Real people that need some new website to do their work. Real deadlines, money that switches hands. Smiling business people that promises things and shake hands. Seems like something you know of?&lt;/p&gt;
&lt;p&gt;Now, imagine bringing a developer and a designer together in a room, for like a month, working together with this new website. Concentrate hard and try to see the images before your very eyes. Will they accomplish anything?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Hell no!&lt;/strong&gt; In 5 minutes they will have started arguing about who should be the first one to open the door, and in what way. One talking about the most efficient way to turn the handle, and the other one defending herself by talking about cosmic beams from Saturn. After the first day the developer will have sore cheeks, after being constantly bitch slapped while hiding under his desk. The third day the designer will sit shaking in a corner after the electric shock induced by the steel helmet the developer built. None of them will survive the fourth day, let alone the project.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Very yes!&lt;/strong&gt; When you meet them after the month has passed you find two harmonic people that smiles to each other and really seem to have connected. They explain to you that the demonstration will be in two parts, first the designer and then the programmer. The designer shows you an app that really touches you, at least you think so, although you not fully understand it. The programmer shows you the other part of the app, one that instantly shows the number 369. They finish the presentation and look at you. You stand up, walk out, lock yourself into a nearby free conference room, and shout with all the power in your lungs: &amp;quot;HOW THE F*#CK AM I GOING TO DO MY TAXES WITH THIS SHIT?!#&amp;quot;. When you come back you find them congratulating each other for making the deadline.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You see? There&#39;s something missing there. Some kind of link between the two. Someone that can walk into a room with two screaming people and calmly say: &amp;quot;Hey, you both kinda run linux (SuSE vs. Mac OS X), and have a &amp;quot;cold&amp;quot; desktop background (default plain blue vs. modern interpretation of &lt;a href=&#34;http://en.wikipedia.org/wiki/Image:Vasnetsov_Snegurochka.jpg&#34;&gt;Vasnetsov Snegurochka&lt;/a&gt;), what a coincidence!?&amp;quot;. There needs to be someone that can walk into the same room the next day and explain that they are talking about two different kinds of &amp;quot;abstract methods&amp;quot;. There needs to be a link.&lt;/p&gt;
&lt;p&gt;But there&#39;s more: An interface developer is silly enough to learn languages that doesn&#39;t even have variables. Even though he know that his code will be sent as uncompressed plaintext and will be rendered by broken excuses for programs, he won&#39;t cry himself to bed every night.&lt;/p&gt;
&lt;p&gt;He will also gladly adapt a design to something it wasn&#39;t really intended for, and he even will make it look somewhat good. He will skip adding those fabulous shadows, to make the deadline on time, and still think of himself a good person.&lt;/p&gt;
&lt;p&gt;You see, even though &amp;quot;interface&amp;quot; reflect the visual graphic things, and &amp;quot;developer&amp;quot; relate to hard logic code, &lt;strong&gt;interface developers&lt;/strong&gt; are real people, not a combination of two halves. I am one.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">What italic means</title>
            <link href="http://friendlybit.com/html/what-italic-means/" rel="alternate" type="text/html" title="What italic means" />
            <published>2007-07-05T07:25:09+02:00</published>
            <updated>2007-07-05T07:25:09+02:00</updated>
            <id>http://friendlybit.com/html/what-italic-means/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Finally an image that dispells all myths about the &lt;i&gt; element. As you can see it&#39;s all about presentation. Disappear you foul demon! (You have more HTML...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/what-italic-means/">
                &lt;p&gt;&lt;a href=&#34;/files/post-media/i-sarah.jpg&#34; data-no-instant&gt;&lt;img src=&#34;/files/post-media/i-sarah.jpg&#34; alt=&#34;HTML Humour: Italic cat&#34; width=&#34;100%&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Finally an image that dispells all myths about the &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; element. As you can see it&#39;s all about presentation. Disappear you foul demon!&lt;/p&gt;
&lt;p&gt;(You have more HTML humor? Show me in the comments)&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Don’t attach HTML-files in Outlook</title>
            <link href="http://friendlybit.com/html/dont-attach-html-files-in-outlook/" rel="alternate" type="text/html" title="Don’t attach HTML-files in Outlook" />
            <published>2007-05-28T21:42:01+02:00</published>
            <updated>2007-05-28T21:42:01+02:00</updated>
            <id>http://friendlybit.com/html/dont-attach-html-files-in-outlook/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Just a short word of warning. I thought I&#39;d mail the min-/max-width template to a colleague at work. So I fired up Outlook, attached the file and sent it. I...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/dont-attach-html-files-in-outlook/">
                &lt;p&gt;Just a short word of warning. I thought I&#39;d mail the &lt;a href=&#34;/files/min-max-template/&#34; data-no-instant&gt;min-/max-width template&lt;/a&gt; to a colleague at work. So I fired up Outlook, attached the file and sent it. I thought that was it, Outlook couldn&#39;t get something simple like that wrong, could it? &lt;strong&gt;Yes it could!&lt;/strong&gt; Opening the file I found some pretty nasty changes…&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A meta-tag with encoding gets added as the first line of the file (before the doctype). This naturally sends browsers into quirks-mode, effectively destroying most layouts.&lt;/li&gt;
&lt;li&gt;Comments are removed from the file, including Internet Explorers own conditional comments. This makes sure any fixes you have applied gets removed, additionally destroying the layout in IE.&lt;/li&gt;
&lt;li&gt;External stylsheets are instantly removed. You didn&#39;t think you could get away with that, did you?&lt;/li&gt;
&lt;li&gt;Links get &lt;code&gt;onClick=&amp;quot;return (false);&amp;quot;&lt;/code&gt; added, making them not work.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Have a look at the &lt;a href=&#34;/files/min-max-template/index_mangled.html&#34; data-no-instant&gt;mangled Outlook file&lt;/a&gt; (and the &lt;a href=&#34;/files/min-max-template/&#34; data-no-instant&gt;original file&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;I&#39;m sure there&#39;s more Outlook does, but those are the things that I noticed on this file. I&#39;ve tried sending files and opening it with Thunderbird, and that seems to work, so the problem appears when you open the file from within Outlook, both when run as a native application and from the webmail version.&lt;/p&gt;
&lt;p&gt;When sending off examples to your clients, do you know what e-mail client they use? Didn&#39;t think so. We better start zipping the files first…&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Accessibility as a platform to build upon</title>
            <link href="http://friendlybit.com/html/accessibility-as-a-platform-to-build-upon/" rel="alternate" type="text/html" title="Accessibility as a platform to build upon" />
            <published>2007-02-03T14:00:23+01:00</published>
            <updated>2007-02-03T14:00:23+01:00</updated>
            <id>http://friendlybit.com/html/accessibility-as-a-platform-to-build-upon/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Two things triggered this post. First a brave participant at the last Geek Meet stood up and asked the question: &#34;Why isn&#39;t it ok to require users have...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/accessibility-as-a-platform-to-build-upon/">
                &lt;p&gt;Two things triggered this post. First a brave participant at the last &lt;a href=&#34;http://www.robertnyman.com/geekmeet/&#34;&gt;Geek Meet&lt;/a&gt; stood up and asked the question: &amp;quot;Why isn&#39;t it ok to require users have javascript enabled?&amp;quot;. A few days afterwards I got a lot of good replies to my article about &lt;a href=&#34;/js/flash-only-vs-ajax-sites/&#34;&gt;AJAX vs. Flash&lt;/a&gt;, claiming that users want multimedia, not plain HTML. To me, those are two different ways of asking one fundamental question: &amp;quot;Is it time we start requiring more from our users?&amp;quot;.&lt;/p&gt;
&lt;h2 id=&#34;html-our-history&#34;&gt;HTML: Our history&lt;a href=&#34;#html-our-history&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;HTML has existed for (at least) 10 years now. The first browser, Mosaic, supported HTML and the same documents that where viewable then is still possible to look at in today&#39;s browsers. You know those polls that are still made to figure out the percentage of users that support javascript or flash? You don&#39;t need those for HTML, everyone supports it. Browsers, Mobile phones, Screen readers, Search engines… Everywhere you turn you have HTML support.&lt;/p&gt;
&lt;p&gt;Now. HTML does not have everything you need to make a fully working website. So what you do is add another layer that figures out what the users what and generate HTML for them. It&#39;s an easy process and the point is that it does not put any pressure on the user at all, even today you can browse most sites with Mosaic. To me, that&#39;s fantastic! We truly have an global format for documents that works everywhere.&lt;/p&gt;
&lt;p&gt;Semantic code and web standards did not change the basics, we still use the same header elements that where there from the beginning. What was added was a meaning to each element that had gotten lost in the table-era. Suddenly screen readers could just present a list of headers and know that they presented a balanced view of the site.&lt;/p&gt;
&lt;h2 id=&#34;but-we-want-more-than-that&#34;&gt;But we want more than that!&lt;a href=&#34;#but-we-want-more-than-that&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In parallell to semantic HTML, Flash and AJAX apps have evolved. They do a good job when it comes to interacting with the user, and interfaces instantly feel more alive. Some developers love them for that.&lt;/p&gt;
&lt;p&gt;My thesis is that even though we do want more multimedia there&#39;s good and bad ways of getting it. Throwing away 10 years of accessibility can&#39;t be the best way? What I want is a way to have both a structured and readable site that is accessible from anywhere, &lt;strong&gt;and&lt;/strong&gt; a site that can give users more interactivity if their browsers support it. Some say it isn&#39;t possible, but as a programmer I know that&#39;s not true. Based on previous comments I know it is possible to add a flash layer on top of a HTML site; you simply parse the HTML from flash.&lt;/p&gt;
&lt;p&gt;You have probably figured this out already but this is what many AJAX apps are doing. They are adding a more interactive layer, on top of HTML. Done right that has incredible consequences for how applications can be accessed by all sorts of devices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Don&#39;t believe those who say accessibility rules out everything else. Use accessibility as a platform to build other apps on top of. Only require more for extras, not the basics.&lt;/strong&gt;&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Separation in the blink of an eye</title>
            <link href="http://friendlybit.com/css/separation-in-the-blink-of-an-eye/" rel="alternate" type="text/html" title="Separation in the blink of an eye" />
            <published>2007-01-23T10:10:11+01:00</published>
            <updated>2007-01-23T10:10:11+01:00</updated>
            <id>http://friendlybit.com/css/separation-in-the-blink-of-an-eye/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;ve seen them so many times: pages where the HTML is mighty fine (!) but the CSS looks like it&#39;s taken straight from Dreamweaver. While I hate having to...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/separation-in-the-blink-of-an-eye/">
                &lt;p&gt;I&#39;ve seen them so many times: pages where the HTML is mighty fine (!) but the CSS looks like it&#39;s taken straight from Dreamweaver. While I hate having to deal with those kinds of designs there is something good about them. They prove the point that HTML and CSS are two separate units, and that it&#39;s possible to mess up one of them and do fine on the other. That&#39;s after all the point of CSS…&lt;/p&gt;
&lt;p&gt;Now. A much more unusual combination is good CSS together with bad HTML. So I put together a little example for you. &lt;a href=&#34;/files/separation_illustrated/&#34; data-no-instant&gt;Separation illustrated&lt;/a&gt; (only works in Firefox, I&#39;m lazy). I&#39;ve made all lines about 80 characters long and removed all other whitespace. Enjoy!&lt;/p&gt;
&lt;p&gt;How&#39;s that for a company website?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Forgotten HTML elements?</title>
            <link href="http://friendlybit.com/html/forgotten-html-elements/" rel="alternate" type="text/html" title="Forgotten HTML elements?" />
            <published>2006-12-04T19:59:26+01:00</published>
            <updated>2006-12-04T19:59:26+01:00</updated>
            <id>http://friendlybit.com/html/forgotten-html-elements/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">HTML has existed for a long time now with five released versions ([1], [2], [3.0], [3.2], [4.01]). Some very interesting elements have existed in previous...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/forgotten-html-elements/">
                &lt;p&gt;HTML has existed for a long time now with five released versions (&lt;a href=&#34;http://www.w3.org/MarkUp/draft-ietf-iiir-html-01.txt&#34; title=&#34;HTML 1 draft&#34;&gt;[1]&lt;/a&gt;, &lt;a href=&#34;http://www.w3.org/MarkUp/html-spec/html-spec_toc.html&#34; title=&#34;HTML 2 Specification&#34;&gt;[2]&lt;/a&gt;, &lt;a href=&#34;http://www.w3.org/MarkUp/html3/Contents.html&#34; title=&#34;HTML 3.0 Specification&#34;&gt;[3.0]&lt;/a&gt;, &lt;a href=&#34;http://www.w3.org/TR/REC-html32&#34; title=&#34;HTML 3.2 Specification&#34;&gt;[3.2]&lt;/a&gt;, &lt;a href=&#34;http://www.w3.org/TR/html401/&#34; title=&#34;HTML 4.01 Specification&#34;&gt;[4.01]&lt;/a&gt;). Some very interesting elements have existed in previous versions and I went on a little journey back in time to find and document them. Off we go.&lt;/p&gt;
&lt;p&gt;Robert Nyman had a little contest a couple of weeks ago where he gave away an iPod to the person that &lt;a href=&#34;http://www.robertnyman.com/2006/10/01/win-a-1-gb-ipod-shuffle-name-your-favorite-html-element/&#34;&gt;best motivated why he/she liked a certain HTML element&lt;/a&gt;. People gave a lot of good explanations and pretty much the whole HTML 4 specification was covered (even blink!). Knowing that all of HTML 4 was taken, and that he didn&#39;t specify what version of HTML to choose, I started searching through the older specs. I was soon stuck in HTML 3.0, and continued reading long after I had found my favorite…&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;note&amp;gt;&lt;/code&gt; was (and is) my favorite. &lt;a href=&#34;http://www.w3.org/MarkUp/html3/notes.html&#34; title=&#34;Specification of notes in HTML 3.0&#34;&gt;Specified in HTML 3.0&lt;/a&gt; as an element that&#39;s there for all kinds of little notes; a sidetrack to something you are currently speaking about, or perhaps some &amp;quot;operation failed&amp;quot; message. They even go as far as to recommend a few default class names: warning, notice, and error. Nice! Wouldn&#39;t this be nice in the current AJAX/Web 2.0 world where everything acts like an application? Why not use note for all those little messages? I could certainly see the use for something like that. Unlike me, the HTML 4 spec writers didn&#39;t see any use of such an element, and note was not included in HTML 4.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;fn&amp;gt;&lt;/code&gt;, also &lt;a href=&#34;http://www.w3.org/MarkUp/html3/footnotes.html&#34; title=&#34;Specification of footnotes in HTML 3.0&#34;&gt;from HTML 3.0&lt;/a&gt;, is up next. Most of the &amp;quot;new&amp;quot; HTML 3.0 elements are aimed at different things that fit into the document metaphor, like research papers and books. So is the next one: fn is short for footnote, a name that clearly defines its purpose. It’s similar to the note element but meant for smaller notes. If you are trying to mimic a book, with references to somewhat disconnected information about something, this one is perfect. But why not use it for things like fancy tooltips while we&#39;re at it? Sadly, this element got kicked out of HTML 4.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;isindex&amp;gt;&lt;/code&gt; is a bit different from the previous elements. It&#39;s defined as far back as &lt;a href=&#34;http://www.w3.org/MarkUp/draft-ietf-iiir-html-01.txt&#34; title=&#34;Specification of isindex in HTML 1&#34;&gt;in HTML 1&lt;/a&gt;, and was &lt;a href=&#34;http://www.w3.org/MarkUp/html3/dochead.html&#34; title=&#34;Specification of isindex in HTML 3.2&#34;&gt;included&lt;/a&gt; all the way to HTML 3.2. It was meant to represent that a certain page could be searched, but gave the user agent the option of how to get the query from the user. If put in the head of the document the user agent should prompt the user on load. If put in the body it should behave like one of those &amp;quot;search this page&amp;quot; form fields we are used to from Google.com. Needless to say, the exact same thing can be accomplished with a snippet of javascript or a HTML form. No need to let this one clutter the spec. Good removal.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;banner&amp;gt;&lt;/code&gt; is another half-breed, &lt;a href=&#34;http://www.w3.org/MarkUp/html3/banners.html&#34; title=&#34;Specification of banner in HTML 3.0&#34;&gt;specified in HTML 3.0&lt;/a&gt;. It&#39;s meant for elements which should be set at a fixed position on the page, much like how position: fixed works in modern browsers. From the name you could think that this is an element you would want to block to get rid of ads, but the HTML 3.0 spec mentions that navigation inside the banner element is OK too. I believe the problem with this element is twofold: first, if it was meant for banners only, why should you want to put you advertisement inside it? That would just mean that it would be easier to block, and I&#39;m sure most advertisers would dislike that. Second, if it&#39;s meant for &amp;quot;information that shouldn&#39;t be scrolled&amp;quot;, then what&#39;s it doing in the HTML? That&#39;s certainly style, and should be in the CSS as well. Another good removal.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt; actually has some uses (Also &lt;a href=&#34;http://www.w3.org/MarkUp/html3/figures.html&#34; title=&#34;Specification of figure in HTMl 3.0&#34;&gt;from HTML 3.0&lt;/a&gt;). It&#39;s meant for all types of media, and has built-in support for alternative content. It has ways to add image maps by using ordinary links and it has support for figure captions. Yes, this is a catch-all for any data that&#39;s not in text-format. Have a look at the &lt;a href=&#34;http://www.w3.org/MarkUp/html3/figures.html&#34;&gt;figure examples in the specification&lt;/a&gt;, looks pretty nice doesn&#39;t it? Why was this removed? My guess is that the &lt;code&gt;&amp;lt;object&amp;gt;&lt;/code&gt; element took its place (see &lt;a href=&#34;http://www.w3.org/TR/html4/struct/objects.html#edef-OBJECT&#34;&gt;object in HTML 4.01&lt;/a&gt;). Object lets you specify more information about the &amp;quot;figures&amp;quot; its meant for, but does not limit itself to images. Yeah, there were reasons to remove figure from the spec too.&lt;/p&gt;
&lt;p&gt;Well, that&#39;s all from friendly bit. Feel free to read through the specs in search for other elements that I&#39;ve missed and post your findings in the comments. Perhaps &lt;a href=&#34;http://www.whatwg.org/specs/web-apps/current-work/&#34;&gt;HTML 5&lt;/a&gt; will even revive some of the old elements?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Web development blogs you should read</title>
            <link href="http://friendlybit.com/css/web-development-blogs-you-should-read/" rel="alternate" type="text/html" title="Web development blogs you should read" />
            <published>2006-11-19T04:40:48+01:00</published>
            <updated>2006-11-19T04:40:48+01:00</updated>
            <id>http://friendlybit.com/css/web-development-blogs-you-should-read/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">The web is filled with blogs about web development. I&#39;m always looking for good blogs to add to my feed reader and I thought some of you might do that too....</summary>
            <content type="html" xml:base="http://friendlybit.com/css/web-development-blogs-you-should-read/">
                &lt;p&gt;The web is filled with blogs about web development. I&#39;m always looking for good blogs to add to my feed reader and I thought some of you might do that too. So let me list the webdev blogs I subscribe to right now (in alphabetic order):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.456bereastreet.com/&#34;&gt;456 Berea St&lt;/a&gt;&lt;/strong&gt; - Roger Johansson is one of the most well known web developers out there, and it&#39;s for a reason. He posts almost daily about things happening in the webdev field. Everything from short comments with links to things to full blown articles.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://headrush.typepad.com/creating_passionate_users/&#34;&gt;Creating passionate users&lt;/a&gt;&lt;/strong&gt; - Simply one of the best blogs there is, all categories. Deals with usability and making users happy. The posts are everything from hilarious to spectacular and I often get the motivation to write from here. Read an article or just look at one of the wonderful graphs. You&#39;ll love it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.thefutureoftheweb.com/&#34;&gt;Future of the web&lt;/a&gt;&lt;/strong&gt; - Jesse Skinner writes for all skill levels. Articles vary from basic markup to advanced javascript tutorials. Often with a twist of humour added in the middle of an article. Nice read.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://mondaybynoon.com&#34;&gt;Monday By Noon&lt;/a&gt;&lt;/strong&gt; - Jon posts articles weekly (as reflected in the name) about all things related to web development. His friendly tone and ability to explain things makes this site ideal for people starting out. The good thing is that the same style works for more experienced people too. Try one of the articles, I&#39;m sure you&#39;ll like it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://f6design.com/journal/&#34;&gt;Pixel Acres&lt;/a&gt;&lt;/strong&gt; - Jonathan Nicol combines webdev articles with thoughts on how to deal with clients and co-workers. Well written and qualitative, what else do you need?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.robertnyman.com/&#34;&gt;Robert&#39;s talk&lt;/a&gt;&lt;/strong&gt; - Robert Nyman&#39;s blog, mixing personal posts with those that have to do with all kinds of interfaces. Entertaining read that feels balanced and well thought-out.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://rundkvadrat.com/&#34;&gt;Rund kvadrat&lt;/a&gt;&lt;/strong&gt; - Blog in Swedish about making money on the web. While this isn&#39;t the primary concern for many interface developers we should certainly keep it in mind. Does moving a certain link upwards increase the client&#39;s sales?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Well, and then there&#39;s all the big ones, but they tend to post too much about the conferences they attended and the books they wrote. Also, all their good articles end up on the big webdev news sites, which I also subscribe to.&lt;/p&gt;
&lt;p&gt;Do you have any other sites that should be on that list?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Web Standards Hero, episode 2</title>
            <link href="http://friendlybit.com/html/web-standards-hero-episode-2/" rel="alternate" type="text/html" title="Web Standards Hero, episode 2" />
            <published>2006-11-07T22:18:47+01:00</published>
            <updated>2006-11-07T22:18:47+01:00</updated>
            <id>http://friendlybit.com/html/web-standards-hero-episode-2/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Read episode 1 first The blistering cold hit him straight in the face as he left the warmth inside. Was it already this cold? He regretted not taking the...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/web-standards-hero-episode-2/">
                &lt;p&gt;&lt;em&gt;Read &lt;a href=&#34;/html/web-standards-hero-episode-1/&#34;&gt;episode 1&lt;/a&gt; first&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The blistering cold hit him straight in the face as he left the warmth inside. Was it already this cold? He regretted not taking the thick coat he had seen in the closet. The thin jacket he had right now had to do, there was no time turning back. It got a little better as he started jogging.&lt;/p&gt;
&lt;p&gt;The table army had gotten quite a head start on him, but even at this distance he could hear their metallic legs marching forward, only interrupted by an occasional crash as they hit something in their way. No screams. Yet.&lt;/p&gt;
&lt;p&gt;The town was rather empty on the winter season of the year, and the few permanent occupants had probably gotten to bed by now. A few years ago people would have gotten up from the terrible sound, but hardly any longer. Nightly fights between street gangs had made people afraid, and few would risk being seen.&lt;/p&gt;
&lt;p&gt;Our hero increased his speed somewhat. He had an idea of how to get to the town hall before his opponents. The tables would probably keep to the main streets; if they took the smaller ones they might have to split up. They wouldn&#39;t risk that, few had any problems breaking a single table. So they would stick together on the bigger streets and he would stay on the smaller ones. He had the exact way plotted in his mind, and felt his speed increasing.&lt;/p&gt;
&lt;p&gt;An elderly woman with her dog walked down a dark alley. She heard quick footsteps approaching from behind and quickly hid in the dark, covering the dog&#39;s mouth with her hand. From her hiding place she saw a young man with big yellow headphones approaching, he certainly looked to be in a rush; with determined steps and eyes fixed straight forward. He continued past her and she got ready to continue her walk. She threw one last look over the shoulder as to make sure she was safe. Like in slow motion she saw the young man being hit by something and flying through the air towards a brick wall. A screeching roar from a nearby alley convinced her not to linger. She quickly disappeared around the corner.&lt;/p&gt;
&lt;p&gt;Our hero woke with his head against something hard. Touching his head he felt that the big headphones had taken the worst hit. The music continued from the other ear and for a while he just laid there listening to the deep base. When he thought about it, the base reminded him about something heavy moving its legs step by step: *Thump*, *thump*. *Thump*, *thump*. That&#39;s wasn&#39;t the base! He jumped out of the way as another spacer gif hit the ground where he had laid. In front of him was a gigantic black shape. A sign, swinging around its neck as it moved forward, clearly stated: &amp;quot;Made in Dreamweaver&amp;quot;.&lt;/p&gt;
&lt;p&gt;It really was huge, patched with layer over layer with machine-made material. Our hero doubted that his text-indent gun would be of any use. He knew he had to be smarter to outnumber this foe, but how?! As he nearly got hit by another gif attack as an idea struck him. He looked at the sewer drain, maybe 20 meters away, and started running towards it. He felt the creature behind him, too busy keeping up with him to be able to shoot anything. With a great leap, worthy of an athlete, he jumped over the drain and continued forward. After a few seconds he heard metal break as the creature stepped through the drain and disappeared down into the black water.&lt;/p&gt;
&lt;p&gt;Yes! He stood still and tried to catch his breath for a while, and listened to the music flowing from only one side of his headphones. There was no doubt now, he was up against professor Font, the maniac who had killed his parents all those years ago. No one else could have created a monster like that. He felt an anger building up inside him and with eyes shining of feverish determination he continued towards the town hall.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Oh jolly gosh! What an adventure. Will our hero make it to the town hall in time? And where are those cookies you promised last episode?! Stay tuned for another episode of… Web Standards Hero!&lt;/em&gt;&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Web Standards Hero, episode 1</title>
            <link href="http://friendlybit.com/html/web-standards-hero-episode-1/" rel="alternate" type="text/html" title="Web Standards Hero, episode 1" />
            <published>2006-10-24T19:10:00+02:00</published>
            <updated>2006-10-24T19:10:00+02:00</updated>
            <id>http://friendlybit.com/html/web-standards-hero-episode-1/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">With a long sigh he throws himself into the big leather sofa he invested in last summer. After a long day of angry customers bitching at him he really needs...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/web-standards-hero-episode-1/">
                &lt;p&gt;With a long sigh he throws himself into the big leather sofa he invested in last summer. After a long day of angry customers bitching at him he really needs some rest. That idea to get a job at the local grocery store was not his best ever.&lt;/p&gt;
&lt;p&gt;On the nearby foot rest a cup of warm chocolate spreads a little cloud of warm smoke. It&#39;s all nicely quiet, and he has had too few hours of sleep lately. Another big sigh and he feels his eyes slowly closing. The world turns blurry…&lt;/p&gt;
&lt;p&gt;Out of nowhere a screeching sound breaks the silence! He&#39;s on his feet instantaneously and sees his warm chocolate make patterns in the air from his accidental kick. Damn it! The sound grows into something unbearably high-pitched and his hands unconsciously cover his ears. Where&#39;s that sound coming from? He pushes his body to move towards the sound, towards the big window against the street.&lt;/p&gt;
&lt;p&gt;Stunned he looks at the procession before him: thousands of metallic tables march the street, drawing their wicked legs against the ground and crashing into everything around them. The sound is unbearable! With hands pushing harder against his ears he ponders: Do they marsh on their own? Highly unlikely, he quickly concludes: tables normally stay in the shadows and stick together to protect each other. The answer to his question is sitting at the top of one of the bigger ones: an old school webmaster swings his whip above him, pushing them forward.&lt;/p&gt;
&lt;p&gt;This is serious. He takes a few steps backwards. The webmaster he saw was armed with at least 50 deadly spacer gifs, all ready to be thrown at anything that passes their way. Visualizing the town map he sees where they are heading, towards the town center. The public offices there are an easy target for them. He needs to act.&lt;/p&gt;
&lt;p&gt;Temporarily letting the terrible sound reach his ears he quickly searches through a wardrobe for his old headphones. And there they are, huge like those ear defenders used by construction workers and bright yellow in color. He puts them on and welcomes the silence and the disguise. No one will recognize him with these on. He picks down a large wooden box from the top shelf. It has been several years since he last used it, but this calls for the heavy cavalry. He opens the lid and lifts up the big text-indent gun. A screw on the side adjusts it to 10000px, and attaches it to his belt after spinning it over his finger. This will get ugly.&lt;/p&gt;
&lt;p&gt;Before leaving he stops at the door and picks up his mp3-player, plugging in the headphones and raising the volume. The electric beat steadily increases as he leaves he apartment with a clear goal in sight: to kick some serious table ass…&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What will happen in the next episode of Web Standards Hero? Will our hero be able to stop the tables from reaching the town center? Will there be cookies? And what does professor Font have to do with all this? Stay tuned!&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: &lt;a href=&#34;/html/web-standards-hero-episode-2/&#34;&gt;Episode 2&lt;/a&gt; available&lt;/p&gt;
&lt;/blockquote&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">How web standards feels</title>
            <link href="http://friendlybit.com/css/how-web-standards-feels/" rel="alternate" type="text/html" title="How web standards feels" />
            <published>2006-10-11T21:34:42+02:00</published>
            <updated>2006-10-11T21:34:42+02:00</updated>
            <id>http://friendlybit.com/css/how-web-standards-feels/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">When talking about web standards many of us have started using marketing terms. Every day we hear about the bandwidth savings, the increased user base that...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/how-web-standards-feels/">
                &lt;p&gt;When talking about web standards many of us have started using marketing terms. Every day we hear about the bandwidth savings, the increased user base that are able to access your site, how well it affects SEO and so on. But none of that was what got me into all this. Let me tell you about the thing that convinced me: the feeling.&lt;/p&gt;
&lt;p&gt;For me the web standards revolution started with a feeling that something was wrong. &amp;quot;There has got to be a better way&amp;quot;, was a thought that buzzed in my ears when nesting my tables to create some padding.&lt;/p&gt;
&lt;p&gt;I first saw CSS in other people&#39;s code, often embedded in style attributes with text-decoration: none; to remove underlines. I started experimenting, but the deeper aspects of how it could change the way websites were built didn&#39;t occur to me. It was just another tool to place things where I wanted them, and make things look like I wanted.&lt;/p&gt;
&lt;p&gt;At that time I didn&#39;t know any server-side language so all my sites where frame based static HTML, often with a fancy javascript enabled select box for navigation. I did use some CSS just to remove the underlinings on my links, but that was it. Something still felt wrong, was this really the best way?&lt;/p&gt;
&lt;p&gt;The &amp;quot;AHA!&amp;quot; feeling came much later; I&#39;d love to say a certain moment when I understood but it wasn&#39;t a certain text or piece of advice, it grew on me. Suddenly everything felt like it had its place. It wasn&#39;t always obvious where that place was, but you could reason your way there. When the strength of CSS occurred to me, it was like finally understanding a tough mathematical formula. Yes!&lt;/p&gt;
&lt;p&gt;So go ahead, show me your pretty charts of workday savings, &lt;a href=&#34;http://csszengarden.com/&#34;&gt;CSS Zen garden&lt;/a&gt; remakes, or new techniques you can use. I like them, I really do, but I&#39;m pretty convinced it&#39;s the &amp;quot;AHA!&amp;quot; feeling that finally wins people over to the web standards side.&lt;/p&gt;
&lt;p&gt;What won you over? Can you convince someone else using that method?&lt;/p&gt;
&lt;p&gt;(Inspiration from &lt;a href=&#34;http://headrush.typepad.com/creating_passionate_users/2006/09/motivating_othe.html&#34;&gt;Motivating others&lt;/a&gt;)&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Encyclopedia of HTML elements</title>
            <link href="http://friendlybit.com/html/encyclopedia-of-html-elements/" rel="alternate" type="text/html" title="Encyclopedia of HTML elements" />
            <published>2006-09-20T23:53:36+02:00</published>
            <updated>2006-09-20T23:53:36+02:00</updated>
            <id>http://friendlybit.com/html/encyclopedia-of-html-elements/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">HTML is a much richer language than what it&#39;s used for. There are 77 elements and each one has a certain purpose. It is possible to find that reason by...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/encyclopedia-of-html-elements/">
                &lt;p&gt;HTML is a much richer language than what it&#39;s used for. There are 77 elements and each one has a certain purpose. It is possible to find that reason by reading the specification, but who does that? I wrote this list as a way to tell you what I think each of the HTML tags should be used for, common problems you might encounter, and general advise about each one.&lt;/p&gt;
&lt;p&gt;I&#39;ve included all the elements from HTML 4.01 &lt;em&gt;Strict&lt;/em&gt;. It&#39;s a long one, but I&#39;m sure you have more &amp;quot;tips and tricks&amp;quot; to add to it. Leave a comment and I&#39;ll add yours to the list too. Let&#39;s start off with a list of all the elements:&lt;/p&gt;
&lt;p class=&#34;linkblock&#34;&gt;
  &lt;a href=&#34;#A&#34;&gt;A&lt;/a&gt;, &lt;a href=&#34;#ABBR&#34;&gt;ABBR&lt;/a&gt;, &lt;a href=&#34;#ACRONYM&#34;&gt;ACRONYM&lt;/a&gt;, &lt;a href=&#34;#ADDRESS&#34;&gt;ADDRESS&lt;/a&gt;, &lt;a href=&#34;#AREA&#34;&gt;AREA&lt;/a&gt;, &lt;a href=&#34;#B&#34;&gt;B&lt;/a&gt;, &lt;a href=&#34;#BASE&#34;&gt;BASE&lt;/a&gt;, &lt;a href=&#34;#BDO&#34;&gt;BDO&lt;/a&gt;, &lt;a href=&#34;#BIG&#34;&gt;BIG&lt;/a&gt;, &lt;a href=&#34;#BLOCKQUOTE&#34;&gt;BLOCKQUOTE&lt;/a&gt;, &lt;a href=&#34;#BODY&#34;&gt;BODY&lt;/a&gt;, &lt;a href=&#34;#BR&#34;&gt;BR&lt;/a&gt;, &lt;a href=&#34;#BUTTON&#34;&gt;BUTTON&lt;/a&gt;, &lt;a href=&#34;#CAPTION&#34;&gt;CAPTION&lt;/a&gt;, &lt;a href=&#34;#CITE&#34;&gt;CITE&lt;/a&gt;, &lt;a href=&#34;#CODE&#34;&gt;CODE&lt;/a&gt;, &lt;a href=&#34;#COL&#34;&gt;COL&lt;/a&gt;, &lt;a href=&#34;#COLGROUP&#34;&gt;COLGROUP&lt;/a&gt;, &lt;a href=&#34;#DD&#34;&gt;DD&lt;/a&gt;, &lt;a href=&#34;#DEL&#34;&gt;DEL&lt;/a&gt;, &lt;a href=&#34;#DFN&#34;&gt;DFN&lt;/a&gt;, &lt;a href=&#34;#DIV&#34;&gt;DIV&lt;/a&gt;, &lt;a href=&#34;#DL&#34;&gt;DL&lt;/a&gt;, &lt;a href=&#34;#DT&#34;&gt;DT&lt;/a&gt;, &lt;a href=&#34;#EM&#34;&gt;EM&lt;/a&gt;, &lt;a href=&#34;#FIELDSET&#34;&gt;FIELDSET&lt;/a&gt;, &lt;a href=&#34;#FORM&#34;&gt;FORM&lt;/a&gt;, &lt;a href=&#34;#H1&#34;&gt;H1&lt;/a&gt;, &lt;a href=&#34;#H1&#34;&gt;H2&lt;/a&gt;, &lt;a href=&#34;#H1&#34;&gt;H3&lt;/a&gt;, &lt;a href=&#34;#H1&#34;&gt;H4&lt;/a&gt;, &lt;a href=&#34;#H1&#34;&gt;H5&lt;/a&gt;, &lt;a href=&#34;#H1&#34;&gt;H6&lt;/a&gt;, &lt;a href=&#34;#HEAD&#34;&gt;HEAD&lt;/a&gt;, &lt;a href=&#34;#HR&#34;&gt;HR&lt;/a&gt;, &lt;a href=&#34;#HTML&#34;&gt;HTML&lt;/a&gt;, &lt;a href=&#34;#I&#34;&gt; I &lt;/a&gt;, &lt;a href=&#34;#IMG&#34;&gt;IMG&lt;/a&gt;, &lt;a href=&#34;#INPUT&#34;&gt;INPUT&lt;/a&gt;, &lt;a href=&#34;#INS&#34;&gt;INS&lt;/a&gt;, &lt;a href=&#34;#KBD&#34;&gt;KBD&lt;/a&gt;, &lt;a href=&#34;#LABEL&#34;&gt;LABEL&lt;/a&gt;, &lt;a href=&#34;#LEGEND&#34;&gt;LEGEND&lt;/a&gt;, &lt;a href=&#34;#LI&#34;&gt;LI&lt;/a&gt;, &lt;a href=&#34;#LINK&#34;&gt;LINK&lt;/a&gt;, &lt;a href=&#34;#MAP&#34;&gt;MAP&lt;/a&gt;, &lt;a href=&#34;#META&#34;&gt;META&lt;/a&gt;, &lt;a href=&#34;#NOSCRIPT&#34;&gt;NOSCRIPT&lt;/a&gt;, &lt;a href=&#34;#OBJECT&#34;&gt;OBJECT&lt;/a&gt;, &lt;a href=&#34;#OL&#34;&gt;OL&lt;/a&gt;, &lt;a href=&#34;#OPTGROUP&#34;&gt;OPTGROUP&lt;/a&gt;, &lt;a href=&#34;#OPTION&#34;&gt;OPTION&lt;/a&gt;, &lt;a href=&#34;#P&#34;&gt;P&lt;/a&gt;, &lt;a href=&#34;#PARAM&#34;&gt;PARAM&lt;/a&gt;, &lt;a href=&#34;#PRE&#34;&gt;PRE&lt;/a&gt;, &lt;a href=&#34;#QU&#34;&gt;Q&lt;/a&gt;, &lt;a href=&#34;#SAMP&#34;&gt;SAMP&lt;/a&gt;, &lt;a href=&#34;#SCRIPT&#34;&gt;SCRIPT&lt;/a&gt;, &lt;a href=&#34;#SELECT&#34;&gt;SELECT&lt;/a&gt;, &lt;a href=&#34;#SMALL&#34;&gt;SMALL&lt;/a&gt;, &lt;a href=&#34;#SPAN&#34;&gt;SPAN&lt;/a&gt;, &lt;a href=&#34;#STRONG&#34;&gt;STRONG&lt;/a&gt;, &lt;a href=&#34;#STYLE&#34;&gt;STYLE&lt;/a&gt;, &lt;a href=&#34;#SUB&#34;&gt;SUB&lt;/a&gt;, &lt;a href=&#34;#SUB&#34;&gt;SUP&lt;/a&gt;, &lt;a href=&#34;#TABLE&#34;&gt;TABLE&lt;/a&gt;, &lt;a href=&#34;#TBODY&#34;&gt;TBODY&lt;/a&gt;, &lt;a href=&#34;#TD&#34;&gt;TD&lt;/a&gt;, &lt;a href=&#34;#TEXTAREA&#34;&gt;TEXTAREA&lt;/a&gt;, &lt;a href=&#34;#TFOOT&#34;&gt;TFOOT&lt;/a&gt;, &lt;a href=&#34;#TH&#34;&gt;TH&lt;/a&gt;, &lt;a href=&#34;#THEAD&#34;&gt;THEAD&lt;/a&gt;, &lt;a href=&#34;#TITLE&#34;&gt;TITLE&lt;/a&gt;, &lt;a href=&#34;#TR&#34;&gt;TR&lt;/a&gt;, &lt;a href=&#34;#TT&#34;&gt;TT&lt;/a&gt;, &lt;a href=&#34;#UL&#34;&gt;UL&lt;/a&gt;, &lt;a href=&#34;#VAR&#34;&gt;VAR&lt;/a&gt;

&lt;p&gt;For people that view this site in a visual browser I added colored bars on all the elements. They represent if an element is recommended to use or not. Green bar means &amp;quot;Use this!&amp;quot;, Yellow means &amp;quot;Consider if you really need it&amp;quot;, and Red means &amp;quot;Don&#39;t use this unless you have a really good reason&amp;quot;.&lt;/p&gt;
&lt;h2 id=&#34;A&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;A&lt;/strong&gt; - Links, the very foundation of the web&lt;a href=&#34;#A&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Should have the href attribute, but be sure to not include &amp;amp; in it. Write that as &amp;amp; instead.&lt;/p&gt;
&lt;p&gt;Don&#39;t put blocks (&lt;a href=&#34;#DIV&#34;&gt;divisions&lt;/a&gt;, &lt;a href=&#34;#P&#34;&gt;paragraphs&lt;/a&gt;) inside of links or you will get a validation error.&lt;/p&gt;
&lt;p&gt;If you set &lt;code&gt;display: block&lt;/code&gt; on a link, you can set its width and height with CSS.&lt;/p&gt;
&lt;h2 id=&#34;ABBR&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;ABBR&lt;/strong&gt; - Explain what your abbreviations mean&lt;a href=&#34;#ABBR&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Abbreviations are words which are short forms of a longer word or phrase. Examples include HTML, int, and Amex&lt;/p&gt;
&lt;p&gt;Should have a title attribute with the explaination of your term.&lt;/p&gt;
&lt;p&gt;Make sure this explanation is humanly readable (unlike how it&#39;s used in &lt;a href=&#34;/html/current-issues-with-microformats/&#34;&gt;microformats&lt;/a&gt;). It&#39;s here to help &lt;em&gt;people&lt;/em&gt; not machines.&lt;/p&gt;
&lt;h2 id=&#34;ACRONYM&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;ACRONYM&lt;/strong&gt; - Special case of the above where the word is formed from beginning parts of the words in a phrase&lt;a href=&#34;#ACRONYM&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;No need to use this one, abbr is enough. Do we really need to differ between acronyms and abbreviations? What about initialisms and the other types of words?&lt;/p&gt;
&lt;h2 id=&#34;ADDRESS&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;ADDRESS&lt;/strong&gt; - Contact information of some kind&lt;a href=&#34;#ADDRESS&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Can be used for more than just street addresses, be creative! E-mail address and other contact info?&lt;/p&gt;
&lt;h2 id=&#34;AREA&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;AREA&lt;/strong&gt; - Define links in any shape&lt;a href=&#34;#AREA&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Useful if you need clickable links in odd shapes. A possible example of this is a map with clickable regions.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://alistapart.com/articles/sprites#irregularshapes&#34;&gt;CSS sprites&lt;/a&gt; is another way of doing something similar using CSS.&lt;/p&gt;
&lt;p&gt;Don&#39;t forget to specify alt text for your area links.&lt;/p&gt;
&lt;p&gt;Isn&#39;t the shape of links really design? Should be specified in the CSS then, not in the HTML.&lt;/p&gt;
&lt;h2 id=&#34;B&#34; class=&#34;incorrect&#34;&gt;&lt;strong&gt;B&lt;/strong&gt; - Make text look bold&lt;a href=&#34;#B&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use. Boldness is design and should be specified in the CSS using &lt;code&gt;font-weight: bold;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you intended to show that something was very important you can use &lt;code&gt;&amp;lt;strong&amp;gt;&amp;lt;/strong&amp;gt;&lt;/code&gt; instead. It describes the meaning better and has the same default styling.&lt;/p&gt;
&lt;h2 id=&#34;BASE&#34; class=&#34;incorrect&#34;&gt;&lt;strong&gt;BASE&lt;/strong&gt; - Change your links to be relative to this address&lt;a href=&#34;#BASE&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you have to use this one, you&#39;re probably doing something wrong. I&#39;ve seen terrible sites using this one.&lt;/p&gt;
&lt;p&gt;There&#39;s a very strange &lt;a href=&#34;http://www.456bereastreet.com/archive/200608/base_elements_cause_text_selection_problems_in_ie/&#34;&gt;Internet Explorer bug with the base element&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;BDO&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;BDO&lt;/strong&gt; - For foreign languages (ie. Hebrew), mark text direction&lt;a href=&#34;#BDO&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is a tricky one. I wouldn&#39;t say text direction is structure (and belong to the HTML), but it isn&#39;t design either (and belong in the CSS). Perhaps it&#39;s content?&lt;/p&gt;
&lt;p&gt;Text direction can be set in the CSS with the &lt;code&gt;dir&lt;/code&gt; attribute&lt;/p&gt;
&lt;h2 id=&#34;BIG&#34; class=&#34;incorrect&#34;&gt;&lt;strong&gt;BIG&lt;/strong&gt; - set larger text relative to surrounding text&lt;a href=&#34;#BIG&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use. This is design and should be in the CSS. Use &lt;code&gt;font-size&lt;/code&gt; instead.&lt;/p&gt;
&lt;h2 id=&#34;BLOCKQUOTE&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;BLOCKQUOTE&lt;/strong&gt; - Longer quotes&lt;a href=&#34;#BLOCKQUOTE&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Include one or many paragraph(s) inside of this one.&lt;/p&gt;
&lt;p&gt;Takes a cite attribute but this isn&#39;t rendered in browsers so use the cite &lt;em&gt;element&lt;/em&gt; instead.&lt;/p&gt;
&lt;p&gt;Don&#39;t ever use this one for indenting text, there&#39;s margin and padding in CSS for that.&lt;/p&gt;
&lt;h2 id=&#34;BODY&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;BODY&lt;/strong&gt; - All your real content goes inside this one&lt;a href=&#34;#BODY&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Always use (even though a page without it for strange reasons still validate).&lt;/p&gt;
&lt;p&gt;Never use bgcolor, background or the a-/v-/link attributes on body. Those can be set by using CSS instead.&lt;/p&gt;
&lt;p&gt;Set a class or id to the body on each of your different pages if you want to style them differently. By using &lt;code&gt;body#contact div&lt;/code&gt;, you can easily style all the divs on only the contact page.&lt;/p&gt;
&lt;h2 id=&#34;BR&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;BR&lt;/strong&gt; - Line break&lt;a href=&#34;#BR&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Instead of marking the line-breaks between your items, mark the items! For ordinary text use &lt;a href=&#34;#P&#34;&gt;paragraphs&lt;/a&gt; around each text block instead of breaks between them. Use a &lt;a href=&#34;#UL&#34;&gt;lists&lt;/a&gt; and add a &lt;a href=&#34;#LI&#34;&gt;line item&lt;/a&gt; around each of the items instead of separating them with line breaks.&lt;/p&gt;
&lt;p&gt;A valid use-case is poems, where line breaks are part of poems themselves.&lt;/p&gt;
&lt;h2 id=&#34;BUTTON&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;BUTTON&lt;/strong&gt; - Alternative to inputs with types submit and reset&lt;a href=&#34;#BUTTON&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A much more general way to add buttons to your form elements (Thanks &lt;a href=&#34;http://pixelcarnage.net/&#34;&gt;Rowan Lewis&lt;/a&gt; for correcting my misstake.)&lt;/p&gt;
&lt;p&gt;Allows you to add more than just text as the label, wrap the content you want inside of the button element.&lt;/p&gt;
&lt;h2 id=&#34;CAPTION&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;CAPTION&lt;/strong&gt; - Description of a table&lt;a href=&#34;#CAPTION&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As many other &lt;a href=&#34;#TABLE&#34;&gt;table&lt;/a&gt; elements, caption is sometimes hard to style with CSS in some browsers. If you start to get into trouble, use a header instead.&lt;/p&gt;
&lt;h2 id=&#34;CITE&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;CITE&lt;/strong&gt; - Source where quoted text originated&lt;a href=&#34;#CITE&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use together with &lt;a href=&#34;#BLOCKQUOTE&#34;&gt;blockquote&lt;/a&gt; to connect the quotation and source.&lt;/p&gt;
&lt;p&gt;Can be used to mark something as reference by wrapping cite around it. This could be useful if you are talking about a book but don&#39;t have a link to it.&lt;/p&gt;
&lt;h2 id=&#34;CODE&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;CODE&lt;/strong&gt; - Computer code example&lt;a href=&#34;#CODE&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Perfect for authors writing about computer code.&lt;/p&gt;
&lt;p&gt;Don&#39;t fall into the trap of using the lang attribute on code to specify what computer language your code is written in. The &lt;a href=&#34;http://www.w3.org/TR/html4/struct/dirlang.html#h-8.1.1&#34;&gt;specification clearly states&lt;/a&gt; that&#39;s not allowed (I need to fix one of my plug-ins that does that on this blog). Thanks trovster.&lt;/p&gt;
&lt;h2 id=&#34;COL&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;COL&lt;/strong&gt; - Used to specify that some table cells belong together in columns&lt;a href=&#34;#COL&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A very nice way of setting attributes of columns of cells in a table. Why not use this to set a class on that last column of cells you want to give that grey background?&lt;/p&gt;
&lt;p&gt;Keep using &lt;a href=&#34;#TH&#34;&gt;table headers&lt;/a&gt;, this is not a replacement for them&lt;/p&gt;
&lt;h2 id=&#34;COLGROUP&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;COLGROUP&lt;/strong&gt; - Shorter way of specifying table columns&lt;a href=&#34;#COLGROUP&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use colgroup instead of several col elements by setting the span attribute to the number of columns you want to affect.&lt;/p&gt;
&lt;h2 id=&#34;DD&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;DD&lt;/strong&gt; - Description of a term in a &lt;a href=&#34;#DL&#34;&gt;definition list&lt;/a&gt;&lt;a href=&#34;#DD&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Several dd:s after each other means that there&#39;s many meanings to a certain term.&lt;/p&gt;
&lt;h2 id=&#34;DEL&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;DEL&lt;/strong&gt; - Mark deleted text in documents&lt;a href=&#34;#DEL&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Good for marking up document revisions, where one author makes changes and what to clearly mark where.&lt;/p&gt;
&lt;p&gt;An interesting idea is to use this for version management (together with &lt;a href=&#34;#ins&#34;&gt;ins&lt;/a&gt;). Probably rare but an interesting idea. An example is how this is used at Wikipedia when comparing historical versions of an article (thanks Fredrico).&lt;/p&gt;
&lt;p&gt;I have never seen an example where this element would be appropriate. Very rare.&lt;/p&gt;
&lt;p&gt;Some screen readers are uncertain of what to do with the text inside of a del element. Should it be included in the page content or not? Be careful (Thanks &lt;a href=&#34;http://www.standards-schmandards.com/&#34;&gt;Peter Krantz&lt;/a&gt;)&lt;/p&gt;
&lt;h2 id=&#34;DFN&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;DFN&lt;/strong&gt; - Term that&#39;s being explained by you&lt;a href=&#34;#DFN&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Useful when you explain a term in the middle of a sentence. Add dfn around the word you explain.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&#34;#DL&#34;&gt;definition list&lt;/a&gt; is more appropriate if you want to explain many terms at the same time.&lt;/p&gt;
&lt;h2 id=&#34;DIV&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;DIV&lt;/strong&gt; - Divider into logical parts&lt;a href=&#34;#DIV&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Divide the page into logical parts. Typical examples are &amp;quot;header&amp;quot;, &amp;quot;content&amp;quot;, &amp;quot;sidebar&amp;quot; and &amp;quot;footer&amp;quot;.&lt;/p&gt;
&lt;p&gt;Divisions should only be used when there&#39;s no other better fitted element available. Keep the number of divs down as much as you can.&lt;/p&gt;
&lt;p&gt;A similar element for inline stuff is the &lt;a href=&#34;#SPAN&#34;&gt;span element&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;DL&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;DL&lt;/strong&gt; - List of definitions&lt;a href=&#34;#DL&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Very useful for glossaries where you provide a term and it&#39;s explanation.&lt;/p&gt;
&lt;p&gt;I use it much wider than just the above, more like a structure for matching key and value. Say you have a list of people and their preferred colors. I would use a definition for that.&lt;/p&gt;
&lt;p&gt;Use dt for the key and dd for the value&lt;/p&gt;
&lt;h2 id=&#34;DT&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;DT&lt;/strong&gt; - What you define in a definition list&lt;a href=&#34;#DT&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you put two dt elements after each other that means that the two terms means the same. The explaination that follows applies to them both.&lt;/p&gt;
&lt;h2 id=&#34;EM&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;EM&lt;/strong&gt; - Important phrase&lt;a href=&#34;#EM&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use this to mark some part of your text a bit more important. Try not the think of the default styling, think importance.&lt;/p&gt;
&lt;p&gt;If you want something stronger, use &lt;a href=&#34;#STRONG&#34;&gt;strong&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&#39;s not always possible to just change a italic element to a em element, are you really using it to mark up importance?&lt;/p&gt;
&lt;h2 id=&#34;FIELDSET&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;FIELDSET&lt;/strong&gt; - Groups form elements that belong together&lt;a href=&#34;#FIELDSET&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Perfect if you have a first and last name in two different text fields and want to show that they belong together.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&#34;#LEGEND&#34;&gt;legend element&lt;/a&gt; should be put inside of the fieldset to label it.&lt;/p&gt;
&lt;p&gt;Fieldset borders are tricky with different browsers, I generally disable them with &lt;code&gt;border: none&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Don&#39;t fall into the trap of using fieldsets for non-form elements. They are meant for grouping form elements, nothing else.&lt;/p&gt;
&lt;h2 id=&#34;FORM&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;FORM&lt;/strong&gt; - Wrapper for all kinds of form fields&lt;a href=&#34;#FORM&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use the form element just like you would use a &lt;a href=&#34;#DIV&#34;&gt;div&lt;/a&gt;, like a wrapper.&lt;/p&gt;
&lt;p&gt;If possible make sure your forms work without javascript enabled. I&#39;m not asking that your sliding-fadeout-gradients are working, just make sure the basic stuff gets through.&lt;/p&gt;
&lt;h2 id=&#34;H1&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;H1, H2, H3, H4, H5, H6&lt;/strong&gt; - Headings for your sections&lt;a href=&#34;#H1&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the most important elements in HTML. If you don&#39;t have any headers on a certain page you&#39;re most certainly doing something wrong. Think about your structure!&lt;/p&gt;
&lt;p&gt;Always start with the h1 element. If you don&#39;t like the size, change it with &lt;code&gt;font-size&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Don&#39;t skip levels of headings. If you have a h5 on the page, all four previous levels should be there too.&lt;/p&gt;
&lt;p&gt;Different browsers have different default sizes for headings. Make sure you set the size for every one of them to get rid of that problem.&lt;/p&gt;
&lt;h2 id=&#34;HEAD&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;HEAD&lt;/strong&gt; - Container for meta data in the document&lt;a href=&#34;#HEAD&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For validation, you only need a &lt;a href=&#34;#TITLE&#34;&gt;title&lt;/a&gt; inside this element, but typical documents have a &lt;a href=&#34;#LINK&#34;&gt;link element&lt;/a&gt; for the stylesheet, a &lt;a href=&#34;#SCRIPT&#34;&gt;script element&lt;/a&gt; for the javascript, and some meta data inside &lt;a href=&#34;#META&#34;&gt;meta elements&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;HR&#34; class=&#34;incorrect&#34;&gt;&lt;strong&gt;HR&lt;/strong&gt; - Horizontal line&lt;a href=&#34;#HR&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use. This is design, the same effect can be accomplished through &lt;code&gt;border-bottom&lt;/code&gt; in CSS.&lt;/p&gt;
&lt;p&gt;Some people claim that hr is a section divider, but isn&#39;t that what we have &lt;a href=&#34;#DIV&#34;&gt;divisions&lt;/a&gt; for?&lt;/p&gt;
&lt;h2 id=&#34;HTML&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;HTML&lt;/strong&gt; - Wrapper for everything except the doctype&lt;a href=&#34;#HTML&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The HTML element can be used as a wrapper (an outer div around all content). Use this to get rid of one unnessesary wrapper.&lt;/p&gt;
&lt;p&gt;Also takes the lang attribute that tells browsers what lanugage the site is written in (thanks &lt;a href=&#34;http://sitesurgeon.co.uk/&#34;&gt;Ben Millard&lt;/a&gt;). This is extra useful for screen readers that needs to change their pronunciations. &lt;a href=&#34;http://www.loc.gov/standards/iso639-2/langcodes.html&#34;&gt;Language codes&lt;/a&gt; are available through the US Library of congress. Use the two letter variants.&lt;/p&gt;
&lt;h2 id=&#34;I&#34; class=&#34;incorrect&#34;&gt;&lt;strong&gt;I&lt;/strong&gt; - Italic text&lt;a href=&#34;#I&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use. Purely presentational way of adding italic styling. Use the &lt;a href=&#34;#EM&#34;&gt;em element&lt;/a&gt; instead.&lt;/p&gt;
&lt;h2 id=&#34;IMG&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;IMG&lt;/strong&gt; - Embedded image&lt;a href=&#34;#IMG&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Used incorrectly very frequently. IMG should only be used for images that can be considered content on the page. An example of this is a thumbnail gallery or a helpful image somehow connected to the text. Things that shouldn&#39;t be img elements are decorations: rounded corners, bullet points in lists, and page dividers. Use &lt;code&gt;background-image&lt;/code&gt; in CSS for that instead.&lt;/p&gt;
&lt;p&gt;If the image contains information that you want to convey, use the alt attribute to give that information to user-agents that doesn&#39;t load images.&lt;/p&gt;
&lt;h2 id=&#34;INPUT&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;INPUT&lt;/strong&gt; - Radio button, check box, text field, button, or hidden data&lt;a href=&#34;#INPUT&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Element used as a building block for form fields. The type is determined by the setting the type attribute to either radio, checkbox, text, image, submit, reset, or hidden.&lt;/p&gt;
&lt;p&gt;Other elements normally used together with this one is &lt;a href=&#34;#SELECT&#34;&gt;select&lt;/a&gt; and &lt;a href=&#34;#TEXTAREA&#34;&gt;textarea&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Make sure you add an id to each input field and tie an &lt;a href=&#34;#LABEL&#34;&gt;label element&lt;/a&gt; to it. No input should be without it.&lt;/p&gt;
&lt;p&gt;Wrap your inputs and labels in a &lt;a href=&#34;#FIELDSET&#34;&gt;fieldset&lt;/a&gt;, paragraph or div to stop the validator from complaining that elements are not allowed where they are.&lt;/p&gt;
&lt;h2 id=&#34;INS&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;INS&lt;/strong&gt; - Inserted text&lt;a href=&#34;#INS&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Similar to &lt;a href=&#34;#DEL&#34;&gt;del&lt;/a&gt;, this element can be used to mark deleted text.&lt;/p&gt;
&lt;p&gt;Might be useful for tracking changes in your document but again, I have never seen a site where this element was needed.&lt;/p&gt;
&lt;h2 id=&#34;KBD&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;KBD&lt;/strong&gt; - Text that should be entered on the keyboard&lt;a href=&#34;#KBD&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the numerous elements that can be used to mark up documents about computers. Rarely used.&lt;/p&gt;
&lt;p&gt;How do you know your user will use the keyboard?&lt;/p&gt;
&lt;h2 id=&#34;LABEL&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;LABEL&lt;/strong&gt; - Text that describes a corresponding form field&lt;a href=&#34;#LABEL&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The for attribute associates this element with a form field id. Important out of an accessibility standpoint, both because it gives screen readers better info and because it makes form fields clickable (in most browsers, but not Safari, thanks &lt;a href=&#34;http://www.456bereastreet.com/&#34;&gt;Roger&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&#34;LEGEND&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;LEGEND&lt;/strong&gt; - Heading for a fieldset element&lt;a href=&#34;#LEGEND&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Wrap this element inside each of your fieldsets to provide a reason why you think the following fields belong together. Typical examples include &amp;quot;Credit card&amp;quot;, &amp;quot;Full address&amp;quot;, and &amp;quot;Shipment details&amp;quot;.&lt;/p&gt;
&lt;p&gt;Somewhat tricky to style since browsers handle them very differently. I tend to keep them pretty plain.&lt;/p&gt;
&lt;h2 id=&#34;LI&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;LI&lt;/strong&gt; - Items in &lt;a href=&#34;#OL&#34; title=&#34;ordered list&#34;&gt;ordered&lt;/a&gt; or &lt;a href=&#34;#UL&#34;&gt;unordered lists&lt;/a&gt;&lt;a href=&#34;#LI&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Gets different styling by default depending on browser: padding-left or margin-left. If you want to change the indention, make sure you first reset the other one.&lt;/p&gt;
&lt;h2 id=&#34;LINK&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;LINK&lt;/strong&gt; - A way to define links to other elements&lt;a href=&#34;#LINK&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most often used to define external stylesheets for the document (use &lt;code&gt;rel=&amp;quot;stylesheet&amp;quot;&lt;/code&gt;)…&lt;/p&gt;
&lt;p&gt;.. but can be used to define &lt;a href=&#34;http://www.subotnik.net/html/link.html.en&#34;&gt;other types of relations&lt;/a&gt; too. Some browsers show custom rel types to users like a list of bookmarks.&lt;/p&gt;
&lt;h2 id=&#34;MAP&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;MAP&lt;/strong&gt; - Wrapper for image map areas&lt;a href=&#34;#MAP&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Used together with the &lt;a href=&#34;#AREA&#34;&gt;area element&lt;/a&gt; for image maps.&lt;/p&gt;
&lt;h2 id=&#34;META&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;META&lt;/strong&gt; - Information about the document&lt;a href=&#34;#META&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Can be used to for custom information about the document.&lt;/p&gt;
&lt;p&gt;Search engines use some &lt;a href=&#34;http://searchenginewatch.com/showPage.html?page=2167931&#34; title=&#34;meta elements supported by search engines&#34;&gt;predefined names&lt;/a&gt; that you should know about.&lt;/p&gt;
&lt;h2 id=&#34;NOSCRIPT&#34; class=&#34;incorrect&#34;&gt;&lt;strong&gt;NOSCRIPT&lt;/strong&gt; - Content to show if the browser doesn&#39;t support javascript&lt;a href=&#34;#NOSCRIPT&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The default should be to show content that does not require javascript, we don&#39;t need a certain element for that.&lt;/p&gt;
&lt;h2 id=&#34;OBJECT&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;OBJECT&lt;/strong&gt; - Embedding other types of information in to document&lt;a href=&#34;#OBJECT&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The new way of adding &lt;a href=&#34;http://www.ambience.sk/flash-valid.htm&#34;&gt;flash&lt;/a&gt;, quicktime and other multimedia content to your site.&lt;/p&gt;
&lt;h2 id=&#34;OL&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;OL&lt;/strong&gt; - Ordered list of items&lt;a href=&#34;#OL&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ordering means that the content only makes sense in that order. This means that a step-by-step recipe is an ordered list, but a basic navigation menu is not (see &lt;a href=&#34;#UL&#34;&gt;unordered list&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&#34;OPTGROUP&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;OPTGROUP&lt;/strong&gt; - Group your option elements&lt;a href=&#34;#OPTGROUP&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the least known elements in HTML. Impress your friends!&lt;/p&gt;
&lt;p&gt;Similar to fieldset but for option elements. Wraps around them and uses the &lt;em&gt;label attribute&lt;/em&gt; to name the group.&lt;/p&gt;
&lt;p&gt;Nesting of optgroups is not allowed.&lt;/p&gt;
&lt;h2 id=&#34;OPTION&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;OPTION&lt;/strong&gt; - One of the choices in a select&lt;a href=&#34;#OPTION&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you set the value attribute, that value is sent instead of the text inside the element.&lt;/p&gt;
&lt;h2 id=&#34;P&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;P&lt;/strong&gt; - Wrapper around each of your paragraphs&lt;a href=&#34;#P&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Replacement for line breaks (the br element).&lt;/p&gt;
&lt;p&gt;By wrapping all your paragraphs in a p element you can easily change the space between them with margin or padding.&lt;/p&gt;
&lt;h2 id=&#34;PARAM&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;PARAM&lt;/strong&gt; - Set properties on embedded objects&lt;a href=&#34;#PARAM&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The exact param names used depends on what you embed, check the documentation for the document you are dealing with.&lt;/p&gt;
&lt;h2 id=&#34;PRE&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;PRE&lt;/strong&gt; - Preformatted text&lt;a href=&#34;#PRE&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Used to define that a certain piece of text is formatted (designed) in the HTML. While this is most often a bad idea there&#39;s applications in e.g. &lt;a href=&#34;http://www.chris.com/ASCII/&#34;&gt;ASCII art&lt;/a&gt;, text-only e-mails, and Python code (thanks zcorpan).&lt;/p&gt;
&lt;p&gt;Use &lt;code&gt;white-space: pre;&lt;/code&gt; and &lt;code&gt;font-family: monospace;&lt;/code&gt; to get the &amp;quot;pre design&amp;quot; with CSS.&lt;/p&gt;
&lt;h2 id=&#34;QU&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;Q&lt;/strong&gt; - Add quotations in a language independent way&lt;a href=&#34;#QU&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Instead of setting what kind of quotes you use (there are several you know), you simply define that you&#39;re dealing with a quote and work out the details in a separate file.&lt;/p&gt;
&lt;p&gt;Good idea, but no support by IE6 makes it a lot less useful.&lt;/p&gt;
&lt;h2 id=&#34;SAMP&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;SAMP&lt;/strong&gt; - Sample text or characters&lt;a href=&#34;#SAMP&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Seriously, don&#39;t we have enough of the computer related elements already? If you need sample text that isn&#39;t code or keyboard type-in then fine, use this one.&lt;/p&gt;
&lt;h2 id=&#34;SCRIPT&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;SCRIPT&lt;/strong&gt; - Run javascript on your site&lt;a href=&#34;#SCRIPT&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Remember to set the type attribute to text/javascript if that&#39;s what you use. Language is no longer needed.&lt;/p&gt;
&lt;h2 id=&#34;SELECT&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;SELECT&lt;/strong&gt; - Let the user select among a number of fixed options&lt;a href=&#34;#SELECT&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t forget to use a &lt;a href=&#34;#LABEL&#34;&gt;label&lt;/a&gt; for this element too.&lt;/p&gt;
&lt;p&gt;It&#39;s easy to make selects work without javascript, just add a submit button. Also check so that all options can be reached with the keyboard.&lt;/p&gt;
&lt;p&gt;Selects take the size attribute which makes you able to show more than one option at the time. If you set size to something larger than one, you can use CSS to set a height.&lt;/p&gt;
&lt;h2 id=&#34;SMALL&#34; class=&#34;incorrect&#34;&gt;&lt;strong&gt;SMALL&lt;/strong&gt; - Presentational way of setting font-size&lt;a href=&#34;#SMALL&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use. A presentational way of saying that some text is smaller than the rest. Use &lt;code&gt;font-size&lt;/code&gt; in CSS instead!&lt;/p&gt;
&lt;p&gt;I&#39;ve seen some interesting ideas of using this tag for &amp;quot;fine print&amp;quot;, those copyright messages that always are tiny. The idea is that the size really is tied to the content, and that small therefore is a good semantic way of representing it. I&#39;m not sure, for now I won&#39;t recommend people using it.&lt;/p&gt;
&lt;h2 id=&#34;SPAN&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;SPAN&lt;/strong&gt; - Similar to &lt;a href=&#34;#DIV&#34;&gt;div&lt;/a&gt; but for inline elements&lt;a href=&#34;#SPAN&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Can be used when you don&#39;t find a better representation. Make sure the class you set describes what you mark up instead.&lt;/p&gt;
&lt;h2 id=&#34;STRONG&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;STRONG&lt;/strong&gt; - Mark something as very important&lt;a href=&#34;#STRONG&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Stronger than emphasis with the &lt;a href=&#34;#EM&#34;&gt;em element&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;STYLE&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;STYLE&lt;/strong&gt; - Add style info to your page&lt;a href=&#34;#STYLE&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Needs to be in the head section of the page, inside body isn&#39;t valid.&lt;/p&gt;
&lt;p&gt;Don&#39;t forget to set the type attribute to &amp;quot;text/css&amp;quot;.&lt;/p&gt;
&lt;p&gt;In my opinion, using &lt;a href=&#34;#LINK&#34;&gt;link&lt;/a&gt; separates the design better than using the style element. It also makes the browser able to cache the CSS.&lt;/p&gt;
&lt;h2 id=&#34;SUB&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;SUB&lt;/strong&gt;, &lt;strong&gt;SUP&lt;/strong&gt; - Raised and lowered characters&lt;a href=&#34;#SUB&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use for lowering and raising letters with no semantic meaning.&lt;/p&gt;
&lt;p&gt;Use in math or chemical formulas (see comments).&lt;/p&gt;
&lt;h2 id=&#34;TABLE&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;TABLE&lt;/strong&gt; - Row and column based data&lt;a href=&#34;#TABLE&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Misused in the &amp;quot;tables for layout&amp;quot; days. Tables. Are. Not. For. Layout.&lt;/p&gt;
&lt;p&gt;Proper use is for scientific, statistical, or other cell-based data.&lt;/p&gt;
&lt;p&gt;Frequently forgotten elements include the &lt;a href=&#34;#THEAD&#34;&gt;thead&lt;/a&gt;, &lt;a href=&#34;#TBODY&#34;&gt;tbody&lt;/a&gt;, and &lt;a href=&#34;#TH&#34;&gt;th&lt;/a&gt; elements.&lt;/p&gt;
&lt;p&gt;If you nest tables you are doing something wrong.&lt;/p&gt;
&lt;p&gt;You can set &lt;code&gt;border-collapse: collapse;&lt;/code&gt; to get rid of the annoying default cellpadding. No attributes need to be set in the HTML.&lt;/p&gt;
&lt;p&gt;Combining border-collapse and a border on &lt;a href=&#34;#TD&#34;&gt;td elements&lt;/a&gt; makes it possible to get nice 1 pixel borders between all cells.&lt;/p&gt;
&lt;h2 id=&#34;TBODY&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;TBODY&lt;/strong&gt; - Container meant to separate the body of your table from your headers&lt;a href=&#34;#TBODY&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Simply use this as a way to style your body different from your headers. Have &lt;a href=&#34;#TH&#34;&gt;th elements&lt;/a&gt; both in the tbody and thead? Then use &lt;span class=&#34;... &#34;&gt;&lt;code&gt;tbody th&lt;/code&gt;&lt;/span&gt; to style only the ones in the header.&lt;/p&gt;
&lt;p&gt;You can use several tbody elements, something that can be a nice way to divide one big table into several logical parts.&lt;/p&gt;
&lt;h2 id=&#34;TD&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;TD&lt;/strong&gt; - Represent one cell of data&lt;a href=&#34;#TD&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use padding, margin and border on td and th to change the spacing inside your table.&lt;/p&gt;
&lt;h2 id=&#34;TEXTAREA&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;TEXTAREA&lt;/strong&gt; - Let users send big chunks of text&lt;a href=&#34;#TEXTAREA&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The size can be specified with height and width in CSS.&lt;/p&gt;
&lt;p&gt;Don&#39;t forget a corresponding &lt;a href=&#34;#LABEL&#34;&gt;label element&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;TFOOT&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;TFOOT&lt;/strong&gt; - Extra information in the bottom of a table&lt;a href=&#34;#TFOOT&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I rarely use this one, most often a caption is what I want below.&lt;/p&gt;
&lt;p&gt;A possible use case for tfoot is for adding column sums at the bottom of the table.&lt;/p&gt;
&lt;h2 id=&#34;TH&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;TH&lt;/strong&gt; - Specify that a certain cell is not part of the data, it just describes the other cells.&lt;a href=&#34;#TH&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Very convenient way of specifying a different style for the headers of the table.&lt;/p&gt;
&lt;p&gt;Takes the scope attribute if you want to specify what cells a certain table header describes.&lt;/p&gt;
&lt;h2 id=&#34;THEAD&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;THEAD&lt;/strong&gt; - Container for (some of) the metadata for a table&lt;a href=&#34;#THEAD&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Some browsers repeat this element on all pages when printing long tables, very useful!&lt;/p&gt;
&lt;h2 id=&#34;TITLE&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;TITLE&lt;/strong&gt; - Topic of the page summarised in a few words&lt;a href=&#34;#TITLE&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Single most important part of your site, think a while before setting it.&lt;/p&gt;
&lt;p&gt;Meant for a single page, not the whole site.&lt;/p&gt;
&lt;p&gt;Required for validation, and gives strange validation errors about &amp;quot;head not closed&amp;quot; if not included.&lt;/p&gt;
&lt;h2 id=&#34;TR&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;TR&lt;/strong&gt; - Way of specifying rows of table cells&lt;a href=&#34;#TR&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Very few browsers support styling the tr element, so set your styles on the containing table cells instead. Example: If you want alternating row colors you can set a class on the tr element but style the table cells with &lt;span class=&#34;background: ... &#34;&gt;&lt;code&gt;tr.odd td&lt;/code&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h2 id=&#34;TT&#34; class=&#34;incorrect&#34;&gt;&lt;strong&gt;TT&lt;/strong&gt; - Text formatted like if it was written on a typewriter&lt;a href=&#34;#TT&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use. Presentational way of adding text that looks like it was written on a typewriter. Use &lt;code&gt;font-family: monospace;&lt;/code&gt; to get the same effect with CSS.&lt;/p&gt;
&lt;h2 id=&#34;UL&#34; class=&#34;correct&#34;&gt;&lt;strong&gt;UL&lt;/strong&gt; - List where the order doesn&#39;t matter&lt;a href=&#34;#UL&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Perfect for navigation menus, don&#39;t use br for that.&lt;/p&gt;
&lt;p&gt;See tip on cross browser use with the ol element.&lt;/p&gt;
&lt;h2 id=&#34;VAR&#34; class=&#34;almost&#34;&gt;&lt;strong&gt;VAR&lt;/strong&gt; - Variable of some kind&lt;a href=&#34;#VAR&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Another element from the computer science area. Some people claim this can be used for other variables too, but that&#39;s a really rare use case. No need to remember.&lt;/p&gt;
&lt;p&gt;What did I miss? Please leave a comment!&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Why XHTML is a bad idea</title>
            <link href="http://friendlybit.com/html/why-xhtml-is-a-bad-idea/" rel="alternate" type="text/html" title="Why XHTML is a bad idea" />
            <published>2006-08-27T15:11:26+02:00</published>
            <updated>2006-08-27T15:11:26+02:00</updated>
            <id>http://friendlybit.com/html/why-xhtml-is-a-bad-idea/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">XHTML is often mentioned when you talk about web standards of different kinds, and many believe that it&#39;s the future of the web. I&#39;m of a different opinion...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/why-xhtml-is-a-bad-idea/">
                &lt;p&gt;XHTML is often mentioned when you talk about web standards of different kinds, and many believe that it&#39;s the future of the web. I&#39;m of a different opinion and this article explains my reasoning.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#history&#34;&gt;Some HTML history&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#xml&#34;&gt;XML enters the scene&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#xhtml&#34;&gt;&amp;quot;Let&#39;s make HTML work like XML&amp;quot;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#problems&#34;&gt;Problems with using XML on the web&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#beginners&#34;&gt;We can&#39;t expect beginners to use XHTML&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;history&#34;&gt;Some HTML history&lt;a href=&#34;#history&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A long time ago, in 1990, the first pieces of HTML came to use. It was built specifically for scientific documents and contained nothing by structural elements. The idea was that the user should be the one deciding what a certain document looked like; after all, you read reports for their content, not for their looks. The target audience for HTML was pretty clear, scientists and other computer literate people: programmers in some sense.&lt;/p&gt;
&lt;p&gt;The web soon became mainstream. Everyone has now surfed the web and lots of people have their own websites. But far from everyone care for code quality and most websites contain serious code errors. Despite the errors it&#39;s worth to remember than most sites &amp;quot;work&amp;quot;, that is, they display like the authors want. All thanks to the error-handling of the current browsers.&lt;/p&gt;
&lt;p&gt;An angry community of programmers/webmasters has complained about bad code since the beginning and demanded that we force people to only produce valid code. I&#39;ve been a part of this group in the past…&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/images/item_xml.gif&#34; alt=&#34;XML icon&#34; class=&#34;secondary&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;xml&#34;&gt;XML enters the scene&lt;a href=&#34;#xml&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Around 1998 the specification for the XML language was released. XML is a language that makes it easy to construct your own languages. Think of it like HTML, but where you make up your own tag names, and where errors are not allowed. The programmers took it in as their new favourite and it spread quickly.&lt;/p&gt;
&lt;p&gt;XML has very precisely defined error-handling (unlike HTML): when the parser finds something unexpected it just stops and displays an error. This means two things: it makes editing XML documents closer to &amp;quot;real programming&amp;quot; (if you make a small error it doesn&#39;t compile), and since you don&#39;t need code for error-handling the parsers become both faster and easier to write. As you can imagine the programmers felt at home.&lt;/p&gt;
&lt;h2 id=&#34;xhtml&#34;&gt;&amp;quot;Let&#39;s make HTML work like XML&amp;quot;&lt;a href=&#34;#xhtml&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;W3C was founded and the programmers from the angry HTML community had made an impression on them. They decided to do something about the lousy code people wrote and standardized a new language for the web. XHTML takes the tags from HTML but adapts the language so that it becomes compatible with XML. The result is a language that can (and should) be parsed with an XML parser.&lt;/p&gt;
&lt;p&gt;So all is well then? No. As you poke around you&#39;ll soon notice that it&#39;s pretty damn hard to get XHTML parsed with an XML parser in current browsers. Let me explain: to decide what parser to use you need to send the correct MIME-type from your server. If you&#39;re using PHP you can do it like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;PHP&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;stristr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$_SERVER&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;HTTP_ACCEPT&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;application/xhtml+xml&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
   &lt;span class=&#34;nb&#34;&gt;header&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Content-type: application/xhtml+xml&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
   &lt;span class=&#34;nb&#34;&gt;header&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Content-type: text/html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;cp&#34;&gt;?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That pretty much asks the browser if it can handle XML and if it can sends the XML MIME-type &amp;quot;application/xhtml+xml&amp;quot;. If it can&#39;t handle it (Internet Explorer 6 and 7 can&#39;t) it gets fed the old MIME “text/html” (and errors are tolerated and corrected).&lt;/p&gt;
&lt;p&gt;But that’s not the only change you need. In the late 2004, Ian Hixie wrote &lt;a href=&#34;http://hixie.ch/advocacy/xhtml&#34;&gt;Sending XHTML as text/html Considered Harmful&lt;/a&gt; (quite technical). As you read through it you see that you have to change a lot more than the MIME if you want your XHTML to work as intended. Summary: doing it the right way is hard.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/images/item_invalid.jpg&#34; alt=&#34;Screenshot of invalid XHTML&#34; class=&#34;secondary&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;problems&#34;&gt;Problems with using XML on the web&lt;a href=&#34;#problems&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;So XHTML is hard to get parsed the intended way in current browsers. Instead most people using it decide (or don&#39;t know otherwise) to parse it like if it was HTML. But doesn&#39;t that defeat the biggest reason to user XHTML in the first place? The only big difference between HTML 4.01 and XHTML is that XHTML can be parsed as XML! &lt;em&gt;As long as you parse your code as HTML there&#39;s no reason to use XHTML&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;If we have a look at the specification of XHTML there&#39;s a little table displaying &lt;a href=&#34;http://www.w3.org/TR/xhtml-media-types/#summary&#34;&gt;what versions of XHTML that should be sent with what MIME type&lt;/a&gt;. You&#39;ll see that it&#39;s ok to send XHTML 1.0 as text/html (may). But looking forward to later versions you see that they &amp;quot;should not&amp;quot; be sent as XHTML. So pretty soon, parsing XHTML as HTML will not be allowed if you want to follow the standards. That leaves parsing it as XML.&lt;/p&gt;
&lt;p&gt;Imagine some kind of dynamic site that allows readers to add content to it. The comments of this site are a good examples. If I used XHTML (and parsed it properly) and someone used invalid code in the comments the page would break. New users to the site would get a big and ugly error message with a line number and some code. Totally unacceptable. So I would have to find a way to parse the HTML in my comments and fix errors that could break the page. Ok.&lt;/p&gt;
&lt;p&gt;Next I copy-paste some text from a site I want to quote to you. When I publish the article I get a big ugly error message because the site I pasted used another character encoding and that breaks my XHTML. I research the problem and find that this could be fixed by parsing all text in my admin console and making sure it&#39;s valid UTF-8 before storing it in the database. Ok.&lt;/p&gt;
&lt;p&gt;Next I download a bit of javascript and try using it on the site. Again people get an ugly error message in their face when they enter. It seems javascript is handled a lot stricter in XHTML and inline javascript needs some strange CDATA characters at the beginning and end of the script element. Ok, so I fix that too.&lt;/p&gt;
&lt;p&gt;And like that it continues, tiny differences in code makes the page break over and over again, and bugs in the parsers I write makes people able to break my site by posting content. I have a computer science education behind me, so I could probably fix the errors and keep patching the site until everything works. But do I want to? What&#39;s wrong with the current way of fixing errors when I notice them when validating? And what about all the non-programmers?&lt;/p&gt;
&lt;h2 id=&#34;beginners&#34;&gt;We can&#39;t expect beginners to use XHTML&lt;a href=&#34;#beginners&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As you&#39;ve read above it&#39;s damn hard to get XHTML right. Still the W3C pushes for XHTML as the new standard for the web. Despite how hard it will be for beginners to get things right. Despite that you will move error handling to the parsers of each website instead of the browsers. Despite that XHTML has almost no backwards compatibility so pretty much &lt;strong&gt;all&lt;/strong&gt; sites on the entire web will have to update their code.&lt;/p&gt;
&lt;p&gt;No, I won&#39;t parse things as XML on the sites I build. XHTML was a bad idea from the start and I&#39;d rather go with the new version of HTML developed under the name &lt;a href=&#34;http://whatwg.org/specs/web-apps/current-work/&#34;&gt;Web Applications 1.0&lt;/a&gt; (also known as HTML 5).&lt;/p&gt;
&lt;p&gt;I hope this article explains why a lot of web development blogs (including Friendly Bit) use HTML. What language do you use?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: More reasons why you should use HTML&lt;/p&gt;
&lt;/blockquote&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">KTH goes web standards</title>
            <link href="http://friendlybit.com/css/kth-goes-web-standards/" rel="alternate" type="text/html" title="KTH goes web standards" />
            <published>2006-08-23T00:36:28+02:00</published>
            <updated>2006-08-23T00:36:28+02:00</updated>
            <id>http://friendlybit.com/css/kth-goes-web-standards/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Sweden&#39;s largest technological university, KTH, just launched their new site and I&#39;m proud to say that I&#39;ve been responsible for the HTML and CSS for it....</summary>
            <content type="html" xml:base="http://friendlybit.com/css/kth-goes-web-standards/">
                &lt;p&gt;Sweden&#39;s &lt;a href=&#34;http://www.kth.se&#34;&gt;largest technological university, KTH&lt;/a&gt;, just launched their new site and I&#39;m proud to say that I&#39;ve been responsible for the HTML and CSS for it. I&#39;d thought I&#39;d take some time and tell you about the techniques I used and the reasons behind using them. Let’s start with some background:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.kth.se&#34;&gt;&lt;img src=&#34;/images/item_kth.jpg&#34; alt=&#34;Blue KTH logotype&#34; class=&#34;secondary&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;about-kth&#34;&gt;About KTH&lt;a href=&#34;#about-kth&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;KTH is an initialism for &amp;quot;Kungliga tekniska högskolan&amp;quot; which translates to &amp;quot;Royal Institute of Technology&amp;quot; in English. It&#39;s the biggest technology focused university in Sweden with almost 17000 registered students for 04/05 (&lt;a href=&#34;http://www.scb.se/statistik/UF/UF0205/2005A02/Web_GR1_RegUnivKon.xls&#34; title=&#34;Number of registered students on KTH&#34;&gt;source&lt;/a&gt;). Add over 3000 employees to that and you&#39;ll start to see the number of people affected by the update. KTH hosts a lot of content, &lt;a href=&#34;http://www.google.com/search?hl=en&amp;amp;q=site%3Akth.se&#34;&gt;Google reports 1,930,000 pages&lt;/a&gt;. Not all pages are included in current the update, but it gives a pointer to what kind of site we are looking at. In summary, a standards based update of KTH affects a lot of people.&lt;/p&gt;
&lt;h2 id=&#34;polopoly-and-the-html&#34;&gt;Polopoly and the HTML&lt;a href=&#34;#polopoly-and-the-html&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I entered the project quite late in the process (&lt;a href=&#34;/css/valtech-my-new-employer/&#34;&gt;Valtech found me&lt;/a&gt;), about a month before launch. Most of the back-end work had already been completed and authors responsible for different parts of the organisation had started filling the database with content. The CMS used was a platform known as Cortina, based on top of the CMS framework &lt;a href=&#34;http://www.polopoly.com&#34;&gt;Polopoly&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Everything was modular and the changes I wanted to do to the HTML nicely cascaded out over the site. When you look at the HTML you&#39;ll notice that it contains a lot of strange whitespace, making the code somewhat difficult to read. That&#39;s because of the template language used, &lt;a href=&#34;http://java.sun.com/products/jsp/jstl/&#34;&gt;JSTL&lt;/a&gt;, which leaves whitespace after each element. I therefore recommend using the &lt;a href=&#34;http://users.skynet.be/mgueury/mozilla/&#34;&gt;HTML validator extension for Firefox&lt;/a&gt; , selecting view source, and then using the button &amp;quot;Clean up the page&amp;quot; in the bottom right corner. That makes the code a bit easier to read for you on the outside. I hope you won&#39;t be too upset over that :)&lt;/p&gt;
&lt;p&gt;You&#39;ll find that all new pages validates as HTML 4.01 Strict (or at least very close, I know of some ampersand encoding errors on one page) and I&#39;m very proud of the outputted HTML. It maps the structure of the content nicely and is easy to browse without CSS enabled. It contains very few elements that are there just as &amp;quot;style hooks&amp;quot; and the id and class names describes the contents of the elements, not their design.&lt;/p&gt;
&lt;h2 id=&#34;css-and-the-techniques-used&#34;&gt;CSS and the techniques used&lt;a href=&#34;#css-and-the-techniques-used&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The new site makes full use of CSS for its layout. We targeted mainly Firefox 1.5 and Internet Explorer 6 with the new site but using web standards I wouldn&#39;t be surprised if it works well in other modern browsers too. For those of you that like fancy terms I can say that the site is a fixed width, zoomable, source ordered, 3 column equal height layout. I&#39;ll talk a little about the fancy terms above and explain the reasoning behind them.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/images/item_ruler.jpg&#34; alt=&#34;Image of a Ruler&#34; class=&#34;secondary&#34; /&gt;&lt;/p&gt;
&lt;h3 id=&#34;fixed-width-layout&#34;&gt;Fixed width layout&lt;a href=&#34;#fixed-width-layout&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Let&#39;s start with the most controversial of the design decisions. The site is optimized for 1024×768 pixel resolutions and up. This was a hard decision but given the content of the site, the design at hand, and the target audience we felt that it was a good one. Let me explain our reasoning:&lt;/p&gt;
&lt;p&gt;KTH has a lot of information to display. Many different parts of the site need to get exposure and the wider 1024 format made that possible. Many of the images were also designed for the wide format and changing the width would mean we would have to examine all of them and decide how to cut each one. Surf around on the site and you&#39;ll see the problems that would bring. Objects in images, meant to be centered, would be offset and some items would be cut. Those content and design issues, together with the somewhat &amp;quot;technological&amp;quot; target audience, convinced us that 1024 was the right decision.&lt;/p&gt;
&lt;h3 id=&#34;zoomable-layout&#34;&gt;Zoomable layout&lt;a href=&#34;#zoomable-layout&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We wanted to make the user able to change the font-size if they wanted to. This meant that quite a few boxes needed to expand with the text, to prevent the text from overflowing them. This was solved by selectively using em units making the boxes expand with the text-zoom. This worked well, and I&#39;m especially proud of the &lt;a href=&#34;http://www.kth.se&#34; title=&#34;KTH:s front-page&#34;&gt;front-page&lt;/a&gt;, with all the different elements expanding and collapsing together. There are a few glitches in the zoomed layouts, a couple of pixels missing here and there, but from the testing we have done those are few (there’s currently one line too much content in the middle box, making the zooming uneven, don’t worry about that :).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/images/item_order.jpg&#34; alt=&#34;List of groceries in order&#34; class=&#34;secondary&#34; /&gt;&lt;/p&gt;
&lt;h3 id=&#34;source-ordering-and-skip-links&#34;&gt;Source ordering and skip links&lt;a href=&#34;#source-ordering-and-skip-links&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The layout is a rather typical 3 column layout with a header and footer. The leftmost column is for navigation, the middle one for the real content, and the right one for additional information. In terms of importance the content is the most important, followed by the additional information column, followed by the navigation. This called for use of a technique known as source ordering, having the content in one order structurally and in another visually.&lt;/p&gt;
&lt;p&gt;Using source ordering is a good way of making it easier for non visual browsers (screen readers, text browsers, and search engines) to get the most important information first. This is not the right article to explain the method in full (some wrapper divs and some clever floats); I&#39;ll save that for a later article. Anyway, what matters is that there are some advantages to using this method and that we decided to use it.&lt;/p&gt;
&lt;p&gt;Others prefer to be able to jump to whatever place in the source they want. For this, &amp;quot;skip links&amp;quot; are quite effective. Skip links are internal links (links pointing to an id somewhere on the same page) that you put in the beginning of the HTML. Clicking the link moves the focus to the corresponding place in the content. We felt that this was a simple way to provide navigation for users with CSS disabled. The skip links where hidden for everyone else.&lt;/p&gt;
&lt;h3 id=&#34;3-column-equal-height&#34;&gt;3 column equal height&lt;a href=&#34;#3-column-equal-height&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As many of the column layouts today this one was made with all columns of equal height. It&#39;s a common complaint amongst the &amp;quot;table for layout&amp;quot; users that these kinds of layouts are too hard to do with CSS. They are not. An easy technique for doing this is known as &lt;a href=&#34;/files/templates/?style=faux_columns&amp;cols=3&amp;nofooter=1&#34; data-no-instant&gt;faux columns&lt;/a&gt; and is simply: putting your columns in a wrapper, floating them left, and setting a background image in the wrapper. The wrapper expands whenever any of the columns expand and shows more of the tiled background image as needed. It&#39;s a simple technique, it works well, doesn’t contain any hacks, and is easy to learn. CSS vs. Tables: 1 - 0.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/images/item_matrixd.jpg&#34; alt=&#34;One of the 5 layouts available&#34; class=&#34;secondary&#34; /&gt;&lt;/p&gt;
&lt;h3 id=&#34;front-page-grid&#34;&gt;Front page grid&lt;a href=&#34;#front-page-grid&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;One of my favourite parts of the site is a feature that most users only will notice over time: The top left part of the front page can be switched between five different layouts, depending on what the editors feel fits their content best. This means that the editors are given a big chance to &amp;quot;design&amp;quot; the front page; a very nice move from the designer.&lt;/p&gt;
&lt;p&gt;For me, as the one responsible for implementing this, I had a couple of though days. But I learnt a lot and ended up using a min-height set with em units on the different boxes. This way I could make boxes at totally different parts of the page zoom together. IE6 handles height as min-height so setting &amp;quot;fixed&amp;quot; heights in a separate file for IE ensured that the design worked there too. After using and testing this method for a couple of weeks I must say that I like the it, it gives me a nice grid to work with, but not a fixed one as with tables. This one expands depending on what the content requires. I recommend you to try it out.&lt;/p&gt;
&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion&lt;a href=&#34;#conclusion&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The developers behind the new KTH website have constructed a site that was incredibly fun to work with. I consider myself lucky to having worked with such a good team and have learnt a lot in the process.&lt;/p&gt;
&lt;p&gt;Also, as a student of KTH for many years I know that the site will be well received by fellow students; and at the end of the day, isn’t that what matters?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Tricks to make your site easier to use</title>
            <link href="http://friendlybit.com/html/make-your-site-easier-to-use/" rel="alternate" type="text/html" title="Tricks to make your site easier to use" />
            <published>2006-08-01T19:17:40+02:00</published>
            <updated>2006-08-01T19:17:40+02:00</updated>
            <id>http://friendlybit.com/html/make-your-site-easier-to-use/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">There are lots of little tricks you can use to make your sites easy to use. Problem is that they are so obvious, you don’t think of them. This article is an...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/make-your-site-easier-to-use/">
                &lt;p&gt;There are lots of little tricks you can use to make your sites easy to use. Problem is that they are so obvious, you don’t think of them. This article is an attempt to share some of the ideas that I &lt;em&gt;did&lt;/em&gt; think of. I&#39;m sure I missed some; feel free to add your own tricks in the comments.&lt;/p&gt;
&lt;p&gt;You rarely think of sites as &amp;quot;easy to use&amp;quot;; they just work. You enter them, click here and there, and don&#39;t think much about how the navigation works or what to do. That&#39;s the feeling we should go for.&lt;/p&gt;
&lt;h2 id=&#34;separate-the-interaction-layer&#34;&gt;Separate the interaction layer&lt;a href=&#34;#separate-the-interaction-layer&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A very simple way of making it easier for your users is clearly marking what can be interacted with. Are users expected to click on those small arrows of yours? Are the only links to your content through your headers? Then you better make sure those arrows or headers come across as clickable.&lt;/p&gt;
&lt;p&gt;The fastest way to convey that something is clickable is using blue underlined text. Why? Because that&#39;s what most sites use (see &lt;a href=&#34;http://www.google.com&#34;&gt;Google&lt;/a&gt;, &lt;a href=&#34;http://www.amazon.com&#34;&gt;Amazon&lt;/a&gt;, &lt;a href=&#34;http://www.ebay.com&#34;&gt;eBay&lt;/a&gt;). It&#39;s what we have grown up with and it just works. Designers tend to dislike blue underlined links and have started to use other colors and skip the underlines. Jakob Nielsen, the notorious usability expert, writes about what you should think of in his &lt;a href=&#34;http://www.useit.com/alertbox/20040510.html&#34;&gt;article about the visual style of links&lt;/a&gt;. It&#39;s a good reminder.&lt;/p&gt;
&lt;p&gt;You don&#39;t have to stop with just the links though. Are your images clickable? Then make sure they connect with your links somehow. If you pick orange as your link color, make something around or in the images use that color too. Make your form fields use the same color. When someone enters your site it should be possible to quickly get an idea of what to do: &amp;quot;I can either click a link in the menu, search for a phrase, or click this thumbnail&amp;quot;. Don&#39;t make people confused by mixing in orange on the static parts of your site.&lt;/p&gt;
&lt;p&gt;With some cleverness I&#39;m sure this idea can be expanded to work even without being dependent on color. A small figure? A border? Use your imagination, and be sure to tell me about it.&lt;/p&gt;
&lt;h2 id=&#34;split-up-your-content&#34;&gt;Split up your content&lt;a href=&#34;#split-up-your-content&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You know those portal sites? There&#39;s one big reason they don&#39;t work. There&#39;s too much content cramped into a too small area. A portal is rarely about something specific, it&#39;s about everything that they can possibly fit in. Whatever content you are looking for you will have to search hard for it. Do you use the portal parts of Yahoo or MSN? Didn&#39;t think so.&lt;/p&gt;
&lt;p&gt;There has been a long discussion recently about how badly designed pages work better. &lt;a href=&#34;http://www.andyrutledge.com/bad-design.php&#34; title=&#34;Bad design harms business, it does not help it&#34;&gt;Like Andy Rutledge&lt;/a&gt; I mostly disagree but I can understand how bad design works for ad-driven sites. Is the point of your pages to make people click ads? Then make them confused, make them think your navigation is the ads, I&#39;m sure it drives your revenue up. If the point of your site is the content on it, stay away from being a portal.&lt;/p&gt;
&lt;p&gt;The simplest way of avoiding the portal-look is splitting up your content. Do you have info on both crocodiles and stock numbers? Don&#39;t put them on the same page. Make sure only the people interested in stocks get the stock info. Anyone else will just see them as &amp;quot;something I am not looking for&amp;quot;. If you have lots of info from diverse fields, perhaps a &lt;a href=&#34;http://dmoz.org/&#34; rel=&#34;nofollow&#34;&gt;directory&lt;/a&gt; is a better bet?&lt;/p&gt;
&lt;h2 id=&#34;use-codeltlabelgtcode-for-form-elements&#34;&gt;Use &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; for form elements&lt;a href=&#34;#use-codeltlabelgtcode-for-form-elements&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bad form elements are one of the most annoying things on the web. Worst are those tiny little checkboxes you need to check to specify if you like to get spammed or not. They are simply too small. There is an easy solution though, that everyone should be aware of: the label element. What it does is associate some text with the checkbox. The browsers use this information by making a click on the text check the box. Note: this also works for radio buttons. Here&#39;s the markup you need:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;action&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;checked&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;checked&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;send_spam&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;checkbox&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;send_spam&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Send me all your &amp;quot;newsletters&amp;quot;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;cursor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There&#39;s a lot more to learn about how to make your forms usable and accessible. Just head over to the Web standards project&#39;s &lt;a href=&#34;http://www.webstandards.org/learn/tutorials/accessible-forms/beginner/&#34;&gt;Accessible forms tutorial&lt;/a&gt; (don&#39;t miss the intermediate one either).&lt;/p&gt;
&lt;h2 id=&#34;make-it-interesting&#34;&gt;Make it interesting&lt;a href=&#34;#make-it-interesting&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You have a few seconds to get you visitor hooked to your site. In that time the user needs to understand he&#39;s on the right track. &amp;quot;Ah, this site seems to be about web development&amp;quot; is what I want my users to feel when they enter Friendly Bit. Therefore almost all my pages have a little info box that tells the visitors just that. To just put this info on your front page isn&#39;t enough, search engines or other external links can make them enter deeper into your site. Please put this little info-box somewhere on all of your sites. It&#39;s one of the best ways for me to see I&#39;m where I want to be.&lt;/p&gt;
&lt;p&gt;To actually get your content interesting you need to work on your writing. My best tip is to follow the points Liz Strauss summed up nicely in her post about &lt;a href=&#34;http://www.successful-blog.com/1/9-1-things-every-reader-wants-from-a-writer/&#34;&gt;what a reader wants&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Read through your text over and over again, out loud if you need to. Pay attention to typography, don&#39;t make your paragraphs too long and use headers extensively.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;a href=&#34;#conclusion&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;These are just some of the tricks I find myself using on my sites. I&#39;m sure this site does not follow all of them perfectly but that doesn&#39;t stop me from telling you about them, does it? Pick and choose as you like, but try to reach make you visitors feel that &amp;quot;it just works&amp;quot;-feeling.&lt;/p&gt;
&lt;p&gt;Do you have any tricks you can share?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Correcting the 20 pro tips (.NET magazine)</title>
            <link href="http://friendlybit.com/css/correcting-the-20-pro-tips/" rel="alternate" type="text/html" title="Correcting the 20 pro tips (.NET magazine)" />
            <published>2006-07-26T05:01:06+02:00</published>
            <updated>2006-07-26T05:01:06+02:00</updated>
            <id>http://friendlybit.com/css/correcting-the-20-pro-tips/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">.NET magazine is a fairly big web development magazine. I&#39;ve recently been referenced to its articles from many separate places, and often found the...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/correcting-the-20-pro-tips/">
                &lt;p&gt;.NET magazine is a fairly big web development magazine. I&#39;ve recently been referenced to its articles from many separate places, and often found the articles to be of good quality. The last one, called &lt;a href=&#34;http://www.netmag.co.uk/zine/design-tutorials/20-pro-tips&#34;&gt;20 pro tips&lt;/a&gt;, was not too good though, so I&#39;m going to go through and correct it. I&#39;m not trying to attack the magazine here (remember &amp;quot;friendly&amp;quot; in the URL), I just want people to know these things.&lt;/p&gt;
&lt;p&gt;The article consists of 20 points that a pro should know. Here are the points I found errors in:&lt;/p&gt;
&lt;h2 id=&#34;stylesheets-importing-vs-linking-point-3&#34;&gt;Stylesheets: importing vs linking (point 3)&lt;a href=&#34;#stylesheets-importing-vs-linking-point-3&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The point is that importing is better than linking since many older browsers will not apply the CSS then. This is correct but they also go as far as suggesting developers to add a separate stylesheet for Netscape 4 (NS4). As someone that has experimented with NS4 I can say that its CSS support is bad. Really bad. Considering the near zero percent of NS4 users I would strongly advise against fixing your site for it. That is of course, unless your site logs suggests you have a lot of users with that (old) browser.&lt;/p&gt;
&lt;p&gt;There&#39;s also a code error here, simple.css is included twice, and the second @import reference should probably be advanced.css. Not a big error but might confuse someone.&lt;/p&gt;
&lt;h2 id=&#34;smarter-gradient-backgrounds-point-4&#34;&gt;Smarter gradient backgrounds (point 4)&lt;a href=&#34;#smarter-gradient-backgrounds-point-4&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Again a good point. CSS can be used to repeat background images on any element, not just body. This means you can save on file size by replacing big images with smaller ones. The article then suggests using 1 pixel wide images which is something old versions of IE has problems with. A lot of repetitions can easily get the browser very slow so my best bet would be to make them at least 5 pixels wide.&lt;/p&gt;
&lt;p&gt;In the code you would be better off using shorthand notation (I know, this is not a big deal). To add an extra pedagogic twist something else than body could have been used:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;background&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;white&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sx&#34;&gt;background.png&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;repeat-x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;ie-box-model-hack-point-8&#34;&gt;IE Box Model Hack (point 8)&lt;a href=&#34;#ie-box-model-hack-point-8&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A lot of confusion here. Internet Explorer 5 (IE5) uses another box model than the modern browsers. The padding and border are not added to the outside of a specified width, but instead included in it. This means that if you specify a 500 pixel wide box and add a 10 pixel border to it, it will still be 500 pixels wide. Some say that this is a better way of calculating widths but that&#39;s missing the point. The point is that according to the W3C box model the padding should be added &lt;em&gt;outside&lt;/em&gt; of the width.&lt;/p&gt;
&lt;p&gt;This problem does not appear in Internet Explorer 6 (IE6) if you &lt;a href=&#34;/css/cross-browser-strategies-for-css/#mode&#34;&gt;include a proper Doctype&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So IE5 is broken, should you care? Again, check your logs if people still use the ancient IE5. My guess is that they don&#39;t which saves you a lot of work. There&#39;s probably &lt;em&gt;no need for this hack&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Also, the &lt;a href=&#34;http://tantek.com/CSS/Examples/boxmodelhack.html&#34;&gt;Box model hack&lt;/a&gt; is Tantek&#39;s hack using the voice-family property to add a &amp;quot;}&amp;quot; to your CSS. It&#39;s really ugly. The article uses the same name for another solution to the problem: wrapping the offending element in another element and moving the padding to that box. That&#39;s a much cleaner way of fixing the problem.&lt;/p&gt;
&lt;h2 id=&#34;space-saver-point-9&#34;&gt;Space saver (point 9)&lt;a href=&#34;#space-saver-point-9&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use inline styles for styling. Try to keep all your styles in the external CSS file. Two more general ways of saving space across browsers are outlined in my &lt;a href=&#34;/css/cross-browser-strategies-for-css/#default&#34;&gt;cross-browser CSS article&lt;/a&gt; (the star-selector and using a premade CSS file that resets browser defaults.&lt;/p&gt;
&lt;h2 id=&#34;format-fundamentals-point-11&#34;&gt;Format fundamentals (point 11)&lt;a href=&#34;#format-fundamentals-point-11&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Good points about image formats. Use 8-bit PNGs instead of GIF, it makes you smaller files.&lt;/p&gt;
&lt;p&gt;An addition: JPEGs are generally smaller than 32-bit PNGs but that&#39;s because JPEG removes information in your image to improve compression. Remember that, if you use JPEG.&lt;/p&gt;
&lt;p&gt;If you use PNG you need to know that IE has problems showing them in the exact correct color (&lt;a href=&#34;http://hsivonen.iki.fi/png-gamma/&#34;&gt;technical explanation of the PNG color problem&lt;/a&gt;). If that matters a lot to you, use another format (remember that all PNGs change color in IE, so images still match each other). Friendly Bit uses PNGs only.&lt;/p&gt;
&lt;h2 id=&#34;the-title-and-alt-attributes-point-12&#34;&gt;The ‘title’ and ‘alt’ attributes (point 12)&lt;a href=&#34;#the-title-and-alt-attributes-point-12&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Don&#39;t use the title attribute unless it&#39;s needed to convey what you mean. In the example it does not make sense at all, why repeat the alt text? The main point is still true though, always use the alt attribute and make good use of the title attribute.&lt;/p&gt;
&lt;h2 id=&#34;wrapping-text-around-images-point-17&#34;&gt;Wrapping text around images (point 17)&lt;a href=&#34;#wrapping-text-around-images-point-17&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Come on! Using the align attribute is going against what was just recommended, use of semantic markup (point 14). Alignment is style and should be added through CSS, nothing else. Adding a strict Doctype and validating will generate an error on this kind of ugliness. Use &lt;span class=&#34;float: left &#34;&gt;&lt;code&gt;img.typeOfImage&lt;/code&gt;&lt;/span&gt; instead.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p class=&#34;first&#34;&gt;
  That&#39;s it for now, hope you learned something. I just wanted to make sure my readers know more than the .NET readers :)
&lt;/p&gt;


            </content>
        </entry>
    
        <entry>
            <title type="html">Challenge: Marking up the world cup</title>
            <link href="http://friendlybit.com/css/challenge-marking-up-the-world-cup/" rel="alternate" type="text/html" title="Challenge: Marking up the world cup" />
            <published>2006-07-03T23:25:37+02:00</published>
            <updated>2006-07-03T23:25:37+02:00</updated>
            <id>http://friendlybit.com/css/challenge-marking-up-the-world-cup/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">It&#39;s at the end of the world cup and it&#39;s everywhere (fotball for those that live in a cave :). It might be that I spend too much time with thinking about...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/challenge-marking-up-the-world-cup/">
                &lt;p&gt;It&#39;s at the end of the world cup and it&#39;s everywhere (&lt;em&gt;fotball&lt;/em&gt; for those that live in a cave :). It might be that I spend too much time with thinking about the web but I got this little markup issue on my mind. I&#39;m not entirely sure how I would solve it but I have some ideas.&lt;/p&gt;
&lt;p&gt;How would you mark up the FIFA World cup 2006 &lt;a href=&#34;http://en.wikipedia.org/wiki/2006_FIFA_World_Cup#Bracket&#34;&gt;single elimination bracket&lt;/a&gt;? If you don&#39;t know what it is, have a look at the page linked to. It&#39;s basically 16 teams that play against eachother, one to one so half of the teams get kicked out in each step. Next step is with 8 teams, 4 teams ans so on. Pretty straight forward.&lt;/p&gt;
&lt;p&gt;Now. Say you got contacted by FIFA to make that chart to put up on the web. Very skilled in Web Standards like you are, you start to think about what kind of data this really is. Is it a list? Ordered, unordered, nested? Is it a table, with the rounds as headers? Is it perhaps a definition list, mapping games played to teams? I don&#39;t have any 100% true answers, I&#39;m hoping for your help there.&lt;/p&gt;
&lt;p&gt;The second problem is of course the style. What methods would you use? There&#39;s quite a lot of boxes to place. Percentages? Can you make it zoom well?&lt;/p&gt;
&lt;p&gt;Pasting code in comments to this blog is a bad idea (they just get messed up), so put it up on your own site instead an link to it by leaving a comment. Add a little explaination of your thinking of you wish. Can you do it?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Here&#39;s my suggestion of &lt;a href=&#34;/files/worldcup/worldcup_bracket.html&#34; data-no-instant&gt;markup and CSS for the world cup bracket&lt;/a&gt;.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Current issues with Microformats</title>
            <link href="http://friendlybit.com/html/current-issues-with-microformats/" rel="alternate" type="text/html" title="Current issues with Microformats" />
            <published>2006-07-01T17:52:06+02:00</published>
            <updated>2006-07-01T17:52:06+02:00</updated>
            <id>http://friendlybit.com/html/current-issues-with-microformats/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">A couple of weeks ago I attended Geek Meet in Stockholm. It&#39;s a small group of people gathering to talk about semantics and share their knowledge of...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/current-issues-with-microformats/">
                &lt;p&gt;A couple of weeks ago I attended &lt;a href=&#34;http://www.robertnyman.com/geekmeet&#34;&gt;Geek Meet&lt;/a&gt; in Stockholm. It&#39;s a small group of people gathering to talk about semantics and share their knowledge of front-end webdev. It was the second meet and, just like on the last one, I had a great time. It&#39;s something special meeting up with people that share your interest for the small niche front-end web development is.&lt;/p&gt;
&lt;p&gt;On that meeting &lt;a href=&#34;http://www.peterkrantz.com/&#34;&gt;Peter Krantz&lt;/a&gt; held a presentation about microformats, a way to standardize small snippets of HTML you use often. What was different with the presentation is that it wasn&#39;t just praise like many new techniques get. The presentation showed both the good and bad sides, and didn’t close with a final conclusion of whether it should be used or not. This article is my view of microformats (and includes some of the issues from Peter’s presentation).&lt;/p&gt;
&lt;h2 id=&#34;what-are-microformats&#34;&gt;What are microformats?&lt;a href=&#34;#what-are-microformats&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Microformats are small standardized snippets of HTML. They are standardized to make it easier for crawlers/robots to find certain types of information. One idea could be to make contact information easier to find for a robot and letting anyone build a directory out of this information. Browsers could support this and display information in some special way. Sounds like a pretty good idea to start with, doesn&#39;t it?&lt;/p&gt;
&lt;p&gt;Microformats are not restricted to contact information, hCards. There&#39;s also hCalendar for description of events, hReview for reviews of things and so on. You&#39;ll find the full list on the &lt;a href=&#34;http://microformats.org/wiki/Main_Page&#34;&gt;microformats wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;An example of a hCard:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;vcard&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
   &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;url fn&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;http://tantek.com/&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Tantek Çelik&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;org&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Technorati&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;serious-problems-with-the-format&#34;&gt;Serious problems with the format&lt;a href=&#34;#serious-problems-with-the-format&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Microformats are not perfect. The first problem is that they don&#39;t use namespaces. Namespaces are some way of describing what you mean with a word and in this case it applies to the class name of the formats. Check the example above. If you wrote a robot, how would you recognise an hCard? The only information available is the class name of the above. This means you would need to search each page for that class name. This is quite inefficient from a parser’s point of view.&lt;/p&gt;
&lt;p&gt;What&#39;s worse, this means no one can use the class name &amp;quot;vcard&amp;quot; on their pages, that would make the robots get faulty information. Even this post probably breaks a few parsers because the code example above looks pretty much like an hCard. I hear the counter argument, &amp;quot;but no one uses vcard as a class name if they don&#39;t use it for that&amp;quot;, I can only tell you I just did.&lt;/p&gt;
&lt;p&gt;Multiplying the damage of not using namespaces is versioning. Compare with HTML, where in early versions of HTML a &lt;a href=&#34;http://hsivonen.iki.fi/doctype/&#34;&gt;Doctype&lt;/a&gt; was not needed. Then the authors decided that the format needed an update, and with the update new elements were added. Without a doctype the browsers couldn&#39;t tell the difference between the formats and the doctype was added in. This is exactly what will happen with hCard (or any other microformat that doesn&#39;t use namespaces) if needs to get updated.&lt;/p&gt;
&lt;p&gt;Is versioning a problem? Not if the format is perfect from the start, without any kinds of problems that need to be fixed in future releases. You see where this is going right?&lt;/p&gt;
&lt;p&gt;Except for the issue with namespaces and parsing of class names we also have dates. Dates with time included are in the hCalendar format marked up with the abbr element. It looks something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;abbr&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;dtstart&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;title&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;20060621T1030-0700&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;21 june 10:30&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;abbr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Is the title attribute used correctly here? I think not. The abbr element is meant to give users that do not know what a certain term/expression stands for a short explaination. In the example above it&#39;s not easy guessing that &amp;quot;T&amp;quot; stands for time and that the number afterwards is a notation of time zone (GMT-7 or PDT-7?). All of this is of course possible to read from the ISO specification, but people hovering your link will not do that. The title attribute on abbr elements should be humanly readable!&lt;/p&gt;
&lt;p&gt;If you still don&#39;t agree with that you can check out ISOs own text about ISO 8601. Under &amp;quot;Advantages of ISO 8601&amp;quot; you can see:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easily readable and writeable by systems&lt;/li&gt;
&lt;li&gt;Easily comparable and sortable&lt;/li&gt;
&lt;li&gt;Language independent&lt;/li&gt;
&lt;li&gt;Larger units are written in front of smaller units&lt;/li&gt;
&lt;li&gt;For most representations the notation is short and of constant length&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While all of those are good points, none of them have anything to do with being easy to read for a human. This is the very point of the title attribute of the abbr element. For the sake of discussion Tantek wrote about the &lt;a href=&#34;http://tantek.com/log/2005/01.html#d26t0100&#34; title=&#34;Reasons behind choosing ISO 8601 for microformats&#34;&gt;choice of ISO 8601&lt;/a&gt; when the use of title was included.&lt;/p&gt;
&lt;h2 id=&#34;improving-the-format&#34;&gt;Improving the format&lt;a href=&#34;#improving-the-format&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The idea of making it easier for robots to parse pages is a good idea, but I&#39;m not sure embedding content for robots into the human content is the best solution. What about putting this information into your &lt;a href=&#34;/feed/&#34; title=&#34;Friendlybit&#39;s web feed&#34;&gt;web feed&lt;/a&gt; instead? Feeds are made to be readable by robots and since they are xml they can easily be expanded with new types of data.&lt;/p&gt;
&lt;p&gt;If I were to consider microformats I would like the two main issues above to be fixed first. &lt;em&gt;Add some kind of namespaces to the formats&lt;/em&gt; and make them required. One idea would be to use a meta element for each format you want to use inside the document. The name is the format you use, the content is what version you are using, and the scheme is a link to the &lt;a href=&#34;http://microformats.org/wiki/xmdp-brainstorming&#34;&gt;microformat profile&lt;/a&gt; that corresponds to that format. Note that the use of this element should be required, not optional.&lt;/p&gt;
&lt;p&gt;It would look something like this (you can of course use several formats by repeating the meta element):&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;meta&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;hCard&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;scheme&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;http://www.w3.org/2006/03/hcard&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The second improvement would be to &lt;em&gt;use something else than the title attribute for the dates&lt;/em&gt;. Titles should be used for human readable content, not machine readable so that needs to change. Switching to another format for dates seems like a bad idea since ISO 8601 is so widely spread. So, what to do? I&#39;m not sure. My best bet would be to use the class attribute like most of the microformats are built up on. The dates do not have a space in them so they can be parsed just like other class names.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;a href=&#34;#conclusion&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Even though microformats are basically trying to make it easier to parse the web (an idea I like) I&#39;m not sure this is the right way of doing it. Human and robot content are most often different things and mixing those in the same document could mean you end up with a mess. I have not touched upon all the extra divs and spans microformats add to the code but that&#39;s also a sign that we&#39;re moving the wrong way.&lt;/p&gt;
&lt;p&gt;If the authors of microformats want their formats to spread they need to fix the two issues above. The two suggestions of improvement I made above would make me consider using them. Right now I don&#39;t feel it’s worth it.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Beyond the web with CSS: PrinceXML and S5</title>
            <link href="http://friendlybit.com/css/beyond-the-web-with-css-princexml-and-s5/" rel="alternate" type="text/html" title="Beyond the web with CSS: PrinceXML and S5" />
            <published>2006-06-25T00:37:34+02:00</published>
            <updated>2006-06-25T00:37:34+02:00</updated>
            <id>http://friendlybit.com/css/beyond-the-web-with-css-princexml-and-s5/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Right now, depending on what kind of presentation you will be doing, you use different techniques. I&#39;m not talking about &#34;presentation&#34; as in design here,...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/beyond-the-web-with-css-princexml-and-s5/">
                &lt;p&gt;Right now, depending on what kind of presentation you will be doing, you use different techniques. I&#39;m not talking about &amp;quot;presentation&amp;quot; as in design here, I&#39;m talking about web sites, printed paper, slide shows and so on, different types of media. How many of you use the print feature in browsers for your reports? Didn&#39;t think so.&lt;/p&gt;
&lt;p&gt;Wouldn&#39;t it be nice if there was only one set of standards you needed to learn? One set that worked for all kinds of documents. One where encoding problems of differences in alphabets had been solved. One with a huge community of developers that gave of their time to help you with problems. Wouldn&#39;t that be nice? Good thing that set of standards exist: HTML and CSS.&lt;/p&gt;
&lt;h2 id=&#34;printing-like-it-once-was-word-and-latex&#34;&gt;Printing like it once was: Word and LaTeX&lt;a href=&#34;#printing-like-it-once-was-word-and-latex&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The ordinary Windows user uses &lt;a href=&#34;http://office.microsoft.com/word&#34;&gt;Mircosoft Word&lt;/a&gt; for editing text. Word is popular for its ease of use and hides all the code from the user, instead showing the document like it will be printed. This of course pushes the filesizes up because of inefficient code, just like with any &lt;acronym title=&#34;What you see is what you get&#34;&gt;WYSIWYG&lt;/acronym&gt; editor. Word supports the separation of structure and design by it&#39;s templates but hides this feature behind menu selections instead of promoting it as the preferred method. It also uses a proprietary format for storing the documents, something that makes sharing documents harder. Word costs a lot, but if you&#39;re lucky it&#39;s included when you buy your Windows machine.&lt;/p&gt;
&lt;p&gt;For scientific work, &lt;a href=&#34;http://www.latex-project.org/&#34;&gt;LaTeX&lt;/a&gt; is very popular. LaTeX takes a very different approach from Word at editing text by requiring the user to mark up structure with its own markup format. It comes with a few predefined designs that you pick among by writing some markup in the beginning of the document. The document is then compiled by a command line program into an intermediary format that can be sent to a printer. If you know what you&#39;re doing, this makes it easy to get those default designs out fast. The problem with LaTeX is when you &lt;em&gt;do&lt;/em&gt; want to change the design. This requires you to dig deep into TeX syntax, a language not known for its ease of use.&lt;/p&gt;
&lt;p&gt;Example of some LaTeX code:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;LATEX&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;\\&lt;/span&gt;documentclass&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;article&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;\\&lt;/span&gt;title&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;Cartesian closed categories and the price of eggs&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;\\&lt;/span&gt;author&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;Jane Doe&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;\\&lt;/span&gt;date&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;September 1994&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;\\&lt;/span&gt;begin&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;document&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;
   &lt;span class=&#34;k&#34;&gt;\\&lt;/span&gt;maketitle
   Hello world!
&lt;span class=&#34;k&#34;&gt;\\&lt;/span&gt;end&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;document&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;printing-with-web-standards-princexml&#34;&gt;Printing with web standards: PrinceXML&lt;a href=&#34;#printing-with-web-standards-princexml&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The runner up in the print category is &lt;a href=&#34;http://princexml.com/&#34;&gt;PrinceXML&lt;/a&gt;. It&#39;s based on ordinary (X)HTML/XML together with CSS and outputs PDF documents ready for printing. The CSS support is quite remarkable, managing to render the &lt;a href=&#34;http://webstandards.org/action/acid2/&#34;&gt;Acid2 test&lt;/a&gt; according to standard and supporting new CSS3 features like cross-references without problem. The handling of page sizes, page footers and headers comes from the &lt;a href=&#34;http://www.w3.org/TR/css3-page/&#34;&gt;CSS3 Paged Media&lt;/a&gt; module and too works well from my testing.&lt;/p&gt;
&lt;p&gt;Below you can see an example of what can be done in PrinceXML. First we add a counter that keeps track of what number each block with the classname figure as. Then we add that number before the figure&#39;s caption. Lastly we add a parantesis with the figure number too all links that link to a certain figure.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;figure&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;counter-increment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;fig&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;figure&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;caption&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;before&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Figure #&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;counter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;fig&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;: &amp;quot;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;^=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;#fig_&amp;quot;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;after&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot; (see figure &amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;target-counter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;attr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;fig&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;)&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I am currently using the program for my degree thesis, a 34 page giant that has quite strict rules it needs to follow for styling. PrinceXML handles things just like it should. It costs a bit, but if you write a lot of documents it&#39;s probably worth it. If you can handle a promotional first page a &lt;a href=&#34;http://princexml.com/download/&#34;&gt;free trial version&lt;/a&gt; is available on the web site.&lt;/p&gt;
&lt;h2 id=&#34;slide-shows-like-they-once-were-powerpoint&#34;&gt;Slide shows like they once were: PowerPoint&lt;a href=&#34;#slide-shows-like-they-once-were-powerpoint&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Microsoft is in the lead in the slide show area too with its well known &lt;a href=&#34;http://office.microsoft.com/powerpoint&#34;&gt;Microsoft PowerPoint&lt;/a&gt;. Interestingly PowerPoint goes a long way towards separation with it&#39;s easy to use layout modes. You pick a layout from a easy to overview list of options and then just click and type to fill it with your content. What isn&#39;t included is design. Much like LaTeX, PowerPoint lets you pick from a number of premade templates but makes it hard to make your own. Given that ease of use is more important for PowerPoint than customization you could say that the product is successful. For someone like me though, that wants to make my own designs, learning how to make PowerPoint templates isn&#39;t easy enough to be interesting. PowerPoint also uses a proprietary format and costs &lt;em&gt;mucho dinero&lt;/em&gt;, but if you are lucky it was included when you bought your computer.&lt;/p&gt;
&lt;h2 id=&#34;slide-shows-with-web-standards-s5&#34;&gt;Slide shows with web standards: S5&lt;a href=&#34;#slide-shows-with-web-standards-s5&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Eric Meyer is the author of a web standards based &lt;a href=&#34;http://meyerweb.com/eric/tools/s5/&#34;&gt;slide show system called S5&lt;/a&gt;. It&#39;s rather easy to use for someone used to HTML and CSS. Pick your favourite properly marked up HTML file, add &lt;code&gt;&amp;lt;div class=&amp;quot;slide&amp;quot;&amp;gt;&lt;/code&gt; around a block of content you want on its own slide, link some javascript and CSS and you&#39;re ready to go. The slide show is then run in a web browser in fullscreen mode. It supports incremental display and resizes with the browser window, just like PowerPoint. It&#39;s also completly free.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;a href=&#34;#summary&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It &lt;em&gt;is&lt;/em&gt; possible to use HTML and CSS for both web, print and slide shows. In fact you can combine all of them and by using the media attribute on your link elements. That way the same document can be shown on the web, be rendered as a PDF in PrinceXML and displayed in a slideshow with S5.&lt;/p&gt;
&lt;p&gt;Isn&#39;t this standards stuff quite fantastic?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Concept: Four layers of web development</title>
            <link href="http://friendlybit.com/css/concept-four-tier-web-development/" rel="alternate" type="text/html" title="Concept: Four layers of web development" />
            <published>2006-06-03T18:45:07+02:00</published>
            <updated>2006-06-03T18:45:07+02:00</updated>
            <id>http://friendlybit.com/css/concept-four-tier-web-development/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">When thinking about web development on the client side, I tend to think of four different layers. Any (well built) framework will cater for all of these...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/concept-four-tier-web-development/">
                &lt;p&gt;When thinking about web development on the client side, I tend to think of four different layers. Any (well built) framework will cater for all of these layers and all good developers will be aware of them. The layers I&#39;m thinking about are: Data, Structure, Design, and Behavior. This article discusses all four of those and explains how they relate.&lt;/p&gt;
&lt;h2 id=&#34;data-layer&#34;&gt;Data layer&lt;a href=&#34;#data-layer&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The data layer is the most important one and strangely the one most people get confused about. HTML is &lt;em&gt;not&lt;/em&gt; the data layer, the &lt;strong&gt;content&lt;/strong&gt; is. The data layer is the raw data that you are presenting, the text, the images, the sound, the video, whatever content you want to serve. For bigger sites the data is often stored in a database or perhaps XML files somewhere and then processed server side every time someone wants to access it.&lt;/p&gt;
&lt;p&gt;This layer is also where all websites should start. What content do you have? If the content is bad no pretty design or fancy Web 2.0 technique is going to cater for that. In fact, content together with bad uses of the other layers, &lt;a href=&#34;http://www.andyrutledge.com/bad-design.php&#34;&gt;might still work&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;One last point to make about data is that you should make sure to use the best possible media for representing your content. If it can be text, use text! Don&#39;t use images for text, narrate your podcasts (or at least provide a text-summary), put your videos online with descriptions to them. Having that text there helps you convey your point, search engines will find you, your users will be able to skim read while it loads and disabled users will get access to at least some of your content.&lt;/p&gt;
&lt;h2 id=&#34;structural-layer&#34;&gt;Structural layer&lt;a href=&#34;#structural-layer&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The structural layer is where the much misunderstood HTML comes to play. HTML&#39;s job is to take the data it has received from the data layer and &lt;a href=&#34;/html/datatypes-of-html/&#34; title=&#34;Some examples of data structures you have available in HTML&#34;&gt;add some structure to it&lt;/a&gt;. Mark up what parts are headers, make sure lists get the HTML that best describes them, split the page up in the important parts and so on.&lt;/p&gt;
&lt;p&gt;HTML also adds some semantics to the data but since it&#39;s quite a limited dictionary we have to work with I believe this is secondary. If you happened to have the kind of data that HTML happens to catch with its elements be sure to use them, if not make sure you at least capture the structure of it.&lt;/p&gt;
&lt;p&gt;You know you have done this level right if your site works with nothing but data and structure.&lt;/p&gt;
&lt;h2 id=&#34;design-layer&#34;&gt;Design layer&lt;a href=&#34;#design-layer&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The design layer is where you define the looks of your data. Design requires a good basic structure to be useful. On the web you should use CSS for this layer, a language that has been built upon the idea of a solid structure and is remarkably powerful. As you know CSS targets certain elements and then defines their look. Without a solid structure this is not possible.&lt;/p&gt;
&lt;p&gt;Good designers often point out that only working with the looks of a site will not accomplish good design. They also work on the structural layer by making sure structurally important content gets the most exposure in the design. This is also strengthens the idea that structure is a layer upon which design works.&lt;/p&gt;
&lt;h2 id=&#34;behavioral-layer&#34;&gt;Behavioral layer&lt;a href=&#34;#behavioral-layer&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Behavior is the last layer I&#39;m going to talk about. It&#39;s the one that&#39;s least important; data, structure and design are all more effective in conveying your message. None the less, added behavioral functionality &lt;em&gt;can&lt;/em&gt; be powerful if executed properly on top of the other layers.&lt;/p&gt;
&lt;p&gt;Javascript is the most used language for adding new behavior to websites. With the whole &lt;a href=&#34;http://en.wikipedia.org/wiki/Web_2.0&#34;&gt;Web 2.0&lt;/a&gt; and &lt;a href=&#34;http://en.wikipedia.org/wiki/Ajax_%28programming%29&#34;&gt;AJAX&lt;/a&gt; wave we are experiencing many new sites that adds a behavioral layer without even thinking about it. We should be careful; becoming dependent on the new behavior (the site not working without it) means you will lose many potential visitors, the most important single one being search engines. Behavior should always be added separately and only enhance the experience for those that has it enabled. This is what&#39;s called unobtrusive javascript.&lt;/p&gt;
&lt;h2 id=&#34;putting-it-all-together-four-tier-web-development&#34;&gt;Putting it all together: four tier web development&lt;a href=&#34;#putting-it-all-together-four-tier-web-development&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Putting all these four parts together we get the following:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/files/four-tier-webdev.png&#34; alt=&#34;Adding layers step by step to a paragraph of text&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Is this the same mental model you use? Let me know through comments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Threehouse has an image up showing the four layers in the context of javascript connection the layers together.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Inline CSS should not be allowed in strict doctypes</title>
            <link href="http://friendlybit.com/css/inline-css-should-not-be-allowed-in-strict-doctypes/" rel="alternate" type="text/html" title="Inline CSS should not be allowed in strict doctypes" />
            <published>2006-05-28T22:48:10+02:00</published>
            <updated>2006-05-28T22:48:10+02:00</updated>
            <id>http://friendlybit.com/css/inline-css-should-not-be-allowed-in-strict-doctypes/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">As many of my readers already know all pages should include a doctype. The doctype tells the browser (or other user agent) what kind of document it can...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/inline-css-should-not-be-allowed-in-strict-doctypes/">
                &lt;p class=&#34;first&#34;&gt;
  As many of my readers already know all pages should include a doctype. The doctype tells the browser (or other user agent) what kind of document it can expect and what standards it follows.
&lt;/p&gt;

&lt;p&gt;You can divide doctypes into two categories. The first category consist of the &lt;em&gt;transitional&lt;/em&gt; ones, the ones that allow old syntax and still validate, and the other one consist of the strict ones. I have repeatedly &lt;a href=&#34;/css/cross-browser-strategies-for-css/#mode&#34;&gt;recommended the strict versions&lt;/a&gt; for a simple reason: it&#39;s the best ones for separating design from content.&lt;/p&gt;
&lt;p&gt;Just to show an example, transitional allows the following:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;bgcolor&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;blue&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;center&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Strict, by its very nature, requires the use of CSS instead.&lt;/p&gt;
&lt;p&gt;What I find strange is that &lt;em&gt;inline CSS&lt;/em&gt; is valid in strict. Inline CSS is when you use the &lt;code&gt;style&lt;/code&gt; attribute to set design information inside of the HTML. As an example the two deprecated pieces of code above can be done with:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;background: blue&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;text-align: center&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;How is that any better than the transitional versions? Inline CSS goes against all the logic involved in the idea of two distinct doctypes. Why should you want to include design information inside of a document that you just explicitly stated would separate the two?&lt;/p&gt;
&lt;p&gt;I hear the obvious reply: &amp;quot;What if I load design info from a database? I need to use inline CSS then!&amp;quot;. To me, that sounds like a perfect case where you need to go &lt;em&gt;transitional&lt;/em&gt;, if you can&#39;t manage to separate the two - don&#39;t.&lt;/p&gt;
&lt;p&gt;Strict doctypes are for documents where the webmaster has taken the time to clearly separate the content from the design, not other hybrids.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Improving the web; Blogging, Google and Web standards</title>
            <link href="http://friendlybit.com/css/improving-the-web/" rel="alternate" type="text/html" title="Improving the web; Blogging, Google and Web standards" />
            <published>2006-05-20T00:12:31+02:00</published>
            <updated>2006-05-20T00:12:31+02:00</updated>
            <id>http://friendlybit.com/css/improving-the-web/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">The web has really changed the way we do things. Remember those paper timetables? No need for them anymore, we simply type in our destination on a box and...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/improving-the-web/">
                &lt;p&gt;The web has really changed the way we do things. Remember those paper timetables? No need for them anymore, we simply type in our destination on a box and get a step by step guide for what to do. Finding recipies? No need to look through books any more, just type in a few ingredients on your favourite food site. The examples are countless but there is no time for us to sit back and relax just yet. The web &lt;em&gt;can&lt;/em&gt; be improved. We can get more people to publish their stuff online, we can get better tools for finding relevant info, and we can make the information accessible to more people. In this article I&#39;m going to talk a little about each of those three points.&lt;/p&gt;
&lt;h2 id=&#34;we-need-more-information&#34;&gt;We need more information&lt;a href=&#34;#we-need-more-information&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We need more information. People will argue and say &amp;quot;No, there&#39;s enough junk online already&amp;quot; but I don&#39;t care. More information is a good thing. The web is currently not a good representation of the world at large. The is a million technology weblogs and five about shoemaking. Another million sites about how it&#39;s like to be a teenager today and another five about life as an 80 year old. You know what I&#39;m getting at? We need a wider variety of people on the web, not only people that are just like us.&lt;/p&gt;
&lt;p&gt;Another thing to remember is that text only is one facet of information. With today’s bandwidth available we can look at live video from all over the world. We can listen to live radio and music just as easy as we read the web. We then have a look at availability. I&#39;d say that at most one out of 1000 people publishing on the web is using something else than text (This site is no exception). I know that there are people out there that have a video camera, that have a microphone, and know how to put it up on the web. But they don&#39;t.&lt;/p&gt;
&lt;p&gt;This lack of variety in information is a real problem. It builds barriers towards people we just don&#39;t know anything about and it fools us surfers to believe the world is smaller than it seems. &amp;quot;No, there can&#39;t be any problems with the Chinese government, we would have heard about it!” or what about &amp;quot;Christianity must be the biggest religion, just look at what people are writing most about&amp;quot;.&lt;/p&gt;
&lt;p&gt;There &lt;em&gt;are&lt;/em&gt; ways the tackle this problem and the concept of blogging is one of them. It makes it easy to almost anyone, anywhere to just start writing in a few minutes. You can be anonymous, you don&#39;t have to tell the truth, there&#39;s no age check and it doesn&#39;t cost you money. This opens up to real diversity on the web. The technology exists, what we need to do is get people online and make them use it. So tell your friends to pick something they love or hate and blog about it. We need more information.&lt;/p&gt;
&lt;h2 id=&#34;we-need-relevant-information&#34;&gt;We need relevant information&lt;a href=&#34;#we-need-relevant-information&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The next step, after we have gotten a larger and more diversified web, is to start filtering it. I&#39;m not talking censoring here, I mean filtering in the sense to &amp;quot;filter what you want&amp;quot;. This can be tied to a certain task you want to accomplish or it can be a strong interest of yours that you want to follow. It doesn&#39;t matter which, what matters is that there are ways to easily find relevant information.&lt;/p&gt;
&lt;p&gt;There are many ways of determining relevancy on the web and the one most successful is linking. Links are like recommendations; anyone that links to a site is telling their readers a certain site is recommended. It&#39;s relevant for the subject at hand and it contains good information. If you are just looking for random information about something looking at a few links might be enough. For example, if &lt;a href=&#34;http://www.456bereastreet.com&#34;&gt;Roger Johansson&lt;/a&gt; links to something web related I can be pretty sure it&#39;s good.&lt;/p&gt;
&lt;p&gt;For more task oriented queries we need something else. If someone is looking for a plane ticket they will probably not know who the authority in that area is. Google is the search engine that has had the greatest success with solving this problem and the solution is simple. Gather the recommendations for as many sites as possible and reply to queries with what &lt;em&gt;most&lt;/em&gt; people recommend. Just think about it, if 100 people recommend FlyPlane and 1000 people AirFlight, who would you go for?&lt;/p&gt;
&lt;p&gt;In reality it isn’t that simple, but in essence that’s how search engines work. Something that is important to note is that the system encourages people to write &lt;em&gt;good content&lt;/em&gt;. Why is that? Simply because good content gets linked to, and more links means it&#39;s probably more relevant. This way Google and all the others are actively encouraging people to improve the web. Good, isn&#39;t it?&lt;/p&gt;
&lt;h2 id=&#34;making-information-accessible&#34;&gt;Making information accessible&lt;a href=&#34;#making-information-accessible&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;So, we have lots of information from all over the world and we have the tools to find the most relevant info at any point. The last step is actually delivering the information to our users. This is where web standards come to play.&lt;/p&gt;
&lt;p&gt;In the early nineties browser makers raced to get the coolest new features included in their browsers. The result was things like blinking text, different methods of representing &amp;quot;layers&amp;quot; and scrolling text. Web developers had a hard time keeping up with browser differences and often you had to construct two or more separate pages to send people to depending on what browser they used.&lt;/p&gt;
&lt;p&gt;The W3C acknowledged this and presented a solution. Instead of browsers trying to find the coolest additions, let a standards organization handle the new additions. Let hundreds of people sit together and discuss new ideas long before they are implemented. When everyone has had a chance to say their meaning and problems has been eliminated you release a document presenting the new features together with implementation details. Now the browser makers can race over who supports the most recommended standards instead, and webmasters can just pick a set of standards that is well supported. One way of doing things instead of many incompatible ones.&lt;/p&gt;
&lt;p&gt;Right now, the current recommendation is to use the strict versions of HTML of XHTML for structure, CSS for design and Javascript for behaviour. Using those standards means that your site is accessible by more than just the few browsers you have tested with. Both people and automated crawlers that that are after just your content can easily skip your design. People with old browsers will still be able to view your content, even though they don’t see the design the still get the content.&lt;/p&gt;
&lt;p&gt;If you adopt the recommendations I mentioned above you have gotten quite far, but there is more. &lt;em&gt;Accessibility&lt;/em&gt; is an area in web development that has gotten far too little exposure. It&#39;s focused on making it easier to people with various disabilities, varying from broken arms and color blindness to dyslexia. Previously people cared about old browsers, it’s time for a shift towards caring about people instead. Read up on accessibility, Mark Pilgrim&#39;s &lt;a href=&#34;http://diveintoaccessibility.org/introduction.html&#34;&gt;Dive into Accessibilty&lt;/a&gt; is a good start.&lt;/p&gt;
&lt;h2 id=&#34;in-summary&#34;&gt;In summary&lt;a href=&#34;#in-summary&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I&#39;ve gone over three areas where I believe there is space for improvement on the web.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More diversified information. Get your friends on the web!&lt;/li&gt;
&lt;li&gt;Better tools for filtering all the information depending on what we need. Build new and better tools for doing this!&lt;/li&gt;
&lt;li&gt;Use web standards and care about accessibility. I try to help in this area with the help of this blog.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now I&#39;m interested in your comments. What do you think? Are there more areas we need to look into?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Emulating tables: Automatic width</title>
            <link href="http://friendlybit.com/css/emulating-tables-automatic-width/" rel="alternate" type="text/html" title="Emulating tables: Automatic width" />
            <published>2006-05-07T01:59:50+02:00</published>
            <updated>2006-05-07T01:59:50+02:00</updated>
            <id>http://friendlybit.com/css/emulating-tables-automatic-width/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Moving from tables to layouts based on CSS is a tough move for many. Things don&#39;t behave the way they use to and some effects are much harder to do with...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/emulating-tables-automatic-width/">
                &lt;p&gt;Moving from tables to layouts based on CSS is a tough move for many. Things don&#39;t behave the way they use to and some effects are much harder to do with CSS. This article is about one of the tricks you might want when trying to get table-like effects using CSS: the dynamic width column, where you let the width be decided by an image. You may jump ahead and look at the &lt;a href=&#34;/files/dynamic_left_column/&#34; data-no-instant&gt;dynamic width column&lt;/a&gt; right away if you want.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The problem&lt;a href=&#34;#the-problem&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;What we are after is a way to emulate a simple effect when using tables. Look at this code:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/files/post-media/huvet_southpark.png&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Some sample text here&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The code above will render two columns, and the width of the left one will be equal to the width of the image. This can be useful on a very dynamic site, where you don&#39;t know the width of the image and so you don&#39;t want to set it using CSS.&lt;/p&gt;
&lt;p&gt;Looking at the code above you might see the problem though. Tables are for tabular data, and and image and some text are certainly not tabular. We need something better.&lt;/p&gt;
&lt;h2 id=&#34;the-solution&#34;&gt;The solution&lt;a href=&#34;#the-solution&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you start to look at the problem you quickly realize that the image needs to be floated. There is just a few ways to put things side by side in CSS and floating is one of the few ways that works like we want it to. The image moves to the left and text flows around it. This looks all nice but if you add a border the other column you see that they are not really side by side. All that has happened is that the &lt;em&gt;text&lt;/em&gt; has been moved to the left, not the container.&lt;/p&gt;
&lt;p&gt;This can be solved by setting &lt;code&gt;overflow: auto;&lt;/code&gt; on the right column. After setting this the container nicely contracts and sits where it should. IE6 doesn&#39;t play by the same rules though. Here you instead need to set &lt;code&gt;height: 1%;&lt;/code&gt; to make it behave.&lt;/p&gt;
&lt;p&gt;This final CSS looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;cartoon&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;example&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;overflow&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;auto&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;auto&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;!important&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;%&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; After Rowan Lewis suggestion I now use &lt;code&gt;height: auto !important;&lt;/code&gt; to send a correct height to modern browsers. IE6 does not understand &lt;code&gt;!important&lt;/code&gt; and will therefore overwrite the height with the 1% value.&lt;/p&gt;
&lt;p&gt;And the following HTML:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;example&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/files/post-media/huvet_southpark.png&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;cartoon&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      Here&amp;#39;s all the text
      Even more text here!
      Even more text here!
      Even more text here!
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Have a look at the example of the &lt;a href=&#34;/files/dynamic_left_column/&#34; data-no-instant&gt;table-like behaviour&lt;/a&gt;.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Datatypes of HTML; why HTML is great for structure</title>
            <link href="http://friendlybit.com/html/datatypes-of-html/" rel="alternate" type="text/html" title="Datatypes of HTML; why HTML is great for structure" />
            <published>2006-05-01T15:42:26+02:00</published>
            <updated>2006-05-01T15:42:26+02:00</updated>
            <id>http://friendlybit.com/html/datatypes-of-html/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">HTML is often bashed by people for being a bad language. People, often used to XML, talk about the lack of good elements for marking up things like authors...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/datatypes-of-html/">
                &lt;p class=&#34;first&#34;&gt;
  HTML is often bashed by people for being a bad language. People, often used to XML, talk about the lack of good elements for marking up things like authors and dates. While I agree that HTML would need a few more tags that help with marking the meaning of things I do think HTML is good at structure. This article is a attempt to show HTML&#39;s power by mapping how different datatypes in the common programming languages map to elements in HTML.
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#lists&#34;&gt;Arrays, Lists, Vectors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#tables&#34;&gt;2D-Arrays, Datasets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#trees&#34;&gt;Trees&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#deflists&#34;&gt;Hashtables, Dictionaries&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;lists&#34;&gt;Arrays, Lists, Vectors&lt;a href=&#34;#lists&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;All programming languages have some way of storing a list of elements. While they are called different names in different languages and support different ways of adding elements they are very similar. HTML supports two kinds of single element lists, the &lt;em&gt;ordered and the unordered list&lt;/em&gt;. When selecting which one of them you should use you just have to ask yourself: &amp;quot;Does this list make sense in another order?”. If it does it&#39;s an unordered list, if not it&#39;s an ordered one.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Unordered list:
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Blue item&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Gray item&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Pink item&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    ...
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
Ordered list:
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ol&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Item 1&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Item 2&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Item 3&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    ...
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ol&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;tables&#34;&gt;2D-Arrays, Datasets&lt;a href=&#34;#tables&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most languages also support some way of arranging your data in a two dimensional grid. The ordinary way is just letting people nest lists inside each other and get several dimensions like that. HTML has recognized the need for a simple way of marking up two-dimensional data in an easy way and therefore added the &lt;em&gt;table element&lt;/em&gt;. Since two dimensions make the data a bit more complex to understand the HTML authors decided to add a few elements that describe what columns and rows mean. Below is a table with the essential elements for metadata added.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Prices for apples in Sweden&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;caption&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Table 1: Prices for various apples in Swedish stores&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;caption&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;thead&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Kind of apple&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Color&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Price&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;thead&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tbody&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Granny Smith&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Light Green&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;3 SEK&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Golden Delicious&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Yellow&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;6 SEK&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;McIntosh&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Golden&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;30 SEK&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tbody&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;trees&#34;&gt;Trees&lt;a href=&#34;#trees&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sometimes you want to have a tree of data; it might be to display a nice view of your historical ancestors or simply the probabilities of something happening. Many programming languages have decided not to include a certain type for this and instead let programmers build their own type with the help of nodes and pointers. HTML instead relies on nested lists for this purpose. The example below shows a nested navigation menu in two levels:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Home&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;About this site&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Sections
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Blue Fishes
                &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Light blue Fishes&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Dark blue Fishes&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Black Fishes&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Red Fishes&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Contact us&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Worth a note is that lists only can contain list items, not other lists. This means that all sublist needs to be wrapped inside a list item like I have done above (the fishes are inside of Sections list item).&lt;/p&gt;
&lt;h2 id=&#34;deflists&#34;&gt;Hashtables, Dictionaries&lt;a href=&#34;#deflists&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Moving on we find the more advanced types of data. Quite often in programming we want to map a string to another string. This can be the case if we are building a dictionary or even if we want to store the price of different products. To me both of the above examples are cases where I would use a HTML &lt;em&gt;definition list&lt;/em&gt;. Definition lists also has a way to mark that certain items might map to several other. By setting two dts after each other you make them both apply to the following dd.&lt;/p&gt;
&lt;p&gt;I&#39;ve made an example below of how to markup a list of properties.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Weight:&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;45 kg&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Length:&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;12 m&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Colors:&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Blue&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Red&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;White&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Cost:&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;500 SEK&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;dl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Definition lists where originally made to just store definitions (as the name suggests) but it&#39;s my opinion that they can be used for more than that. HTML lacks a lot of semantics and this is a way to extend it a bit. Feel free to leave a comment if you disagree.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;It&#39;s my opinion that HTML is good at marking up structure. Sure there are some types of data that can&#39;t be represented with HTML but the most common types are easy to do. Do you have more types to add to the list? Leave a comment!&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Web Development Pack</title>
            <link href="http://friendlybit.com/css/web-development-pack/" rel="alternate" type="text/html" title="Web Development Pack" />
            <published>2006-04-24T17:20:05+02:00</published>
            <updated>2006-04-24T17:20:05+02:00</updated>
            <id>http://friendlybit.com/css/web-development-pack/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">When I move to a new computer, I keep installing the same tools again and again. I always have problems finding them because they are spread out all over...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/web-development-pack/">
                &lt;p class=&#34;first&#34;&gt;
  When I move to a new computer, I keep installing the same tools again and again. I always have problems finding them because they are spread out all over the net. This article is an attempt to gather the links to the important web development tools in one place, as a resource for beginners.
&lt;/p&gt;

&lt;p class=&#34;first&#34;&gt;
  (&lt;strong&gt;Update &lt;/strong&gt;2009-02-16&lt;strong&gt;: &lt;/strong&gt;This is an update to an old article, I can&#39;t have old stuff polluting the site)
&lt;/p&gt;

&lt;h2 id=&#34;browsers-you-need&#34;&gt;Browsers you need&lt;a href=&#34;#browsers-you-need&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For modern web development today it&#39;s important to test in more than one browser. The current best practice is to first test in one that has good support for standards and then move on to the older ones and fix your site for them.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.mozilla.com/firefox/&#34;&gt;Mozilla Firefox&lt;/a&gt;&lt;/strong&gt; is a great browser and a serious challenger to Internet Explorer. The best web development feature of Firefox is all its extensions that are available. I have made a special section about good extensions to use below.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.my-debugbar.com/wiki/IETester/HomePage&#34;&gt;IE Tester&lt;/a&gt;&lt;/strong&gt; helps to test your site in Internet Explorer. It is the browser that is used by most people over the world (because it ships with Windows, not because it’s the best one). The good thing with IE Tester is that it lets you run multiple versions of IE at the same time. No need for virtual machines. Consider hard if you &lt;a href=&#34;/browsers/motivation-for-building-for-ie6/&#34;&gt;need support for IE6&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.apple.com/support/downloads/safari.html&#34;&gt;Safari&lt;/a&gt;&lt;/strong&gt; / &lt;strong&gt;&lt;a href=&#34;http://www.google.com/chrome&#34;&gt;Chrome&lt;/a&gt;&lt;/strong&gt; are two good browsers based on the webkit rendering engine. Webkit&#39;s greatest merit is that it was one of the first browsers to complete the &lt;a href=&#34;http://webstandards.org/action/acid2/guide/&#34;&gt;Acid2 test&lt;/a&gt;. Safari is also very popular on the Mac, so you probably you make sure it works.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.opera.com/download/&#34;&gt;Opera&lt;/a&gt;&lt;/strong&gt; is another good browser with a little fewer users. The Opera team has put great effort to make any standards compliant site work in Opera so there’s no reason why your site shouldn’t work. There’s a few quirks though and it can therefore be worthwhile to test in it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;firefox-extensions&#34;&gt;Firefox extensions&lt;a href=&#34;#firefox-extensions&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Firefox extension system has made it possible for thousands of developers to make little snippets of code that add useful features to Firefox. There are a lot of extensions out there and so I’m sure I’m missing many but here’s the list that I just can’t live without (related to web development):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://getfirebug.com/&#34;&gt;Firebug&lt;/a&gt;&lt;/strong&gt; is the best thing that has happened to front-end development. It lets you click elements in the browser, and shows what HTML and CSS is needed to render the element you clicked. Excellent! Makes everything so much easier. Allows manipulation that is updated in realtime&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://chrispederick.com/work/webdeveloper/&#34;&gt;Web development toolbar&lt;/a&gt;&lt;/strong&gt; is an extension for Firefox that enables all kinds of useful features. It can give you borders around all your elements, it allows you to edit CSS in a sidebar and see the changes instantly, it allows you to remove images just to name a few. I can’t work at all without this one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://users.skynet.be/mgueury/mozilla/&#34;&gt;HTML Validatior&lt;/a&gt;&lt;/strong&gt; is the third must-have extension. It validates pages you visit on the fly, and shows a small red cross in the statusbar if you don&#39;t validate. Great way to quickly discover errors in your HTML.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.colorzilla.com/firefox/&#34;&gt;ColorZilla&lt;/a&gt;&lt;/strong&gt; is extremely useful for finding out HTML color codes from images, something you will do a lot when coding graphic intensive pages.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;other-programs-you-might-need&#34;&gt;Other programs you might need&lt;a href=&#34;#other-programs-you-might-need&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You&#39;re not only going to be surfing to your site, you&#39;re also going to need a program to write your code in, a graphics editor, and a FTP program to send your files off to the server with.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I&#39;ve always had problems finding a text editor that I liked. They either don&#39;t allow me to use the windows shortcuts I&#39;ve learned to love, don&#39;t allow proper color coding of the languages I care about, don&#39;t handle setting up project in an easy enough manner, or handle character encoding badly. So I&#39;ve just resorted to using whatever editor that fits best with the environment I&#39;m currently working in. &lt;strong&gt;&lt;a href=&#34;http://www.netbeans.org/downloads/&#34;&gt;Netbeans&lt;/a&gt;&lt;/strong&gt; for Java, &lt;strong&gt;Visual Studio&lt;/strong&gt; (non-free) for .NET, and &lt;strong&gt;&lt;a href=&#34;http://www.activestate.com/komodo_edit/&#34;&gt;Komodo Edit&lt;/a&gt;&lt;/strong&gt; for Python and PHP.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.macromedia.com/software/fireworks/&#34;&gt;Fireworks&lt;/a&gt;&lt;/strong&gt; (non-free) is a graphics editor that lets me work with both vector and bitmap files. It allows filters that can be easily removed and tweaked without breaking the original. It also has a nice slice feature that let&#39;s me export parts of design mock-ups quickly. There&#39;s no free program worth its name.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://filezilla-project.org/&#34;&gt;FileZilla&lt;/a&gt;&lt;/strong&gt; is a good open-source FTP program I keep coming back to. I fire it up and it just works every time. It&#39;s fairly feature-rich but you don&#39;t need to know all of it to get it going. If you do want to play with advanced stuff it&#39;s there. Easy to use, fast, many features.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&#39;s it. All that is left is for you to either agree or disagree.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">What beginners ask for (and what I tell them)</title>
            <link href="http://friendlybit.com/css/what-beginners-ask-for-and-what-i-tell-them/" rel="alternate" type="text/html" title="What beginners ask for (and what I tell them)" />
            <published>2006-03-27T22:22:07+02:00</published>
            <updated>2006-03-27T22:22:07+02:00</updated>
            <id>http://friendlybit.com/css/what-beginners-ask-for-and-what-i-tell-them/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Being in an IRC help channel lets you meet a lot of people. Many are fresh beginners that just wrote their first lines of CSS and stumbled over something...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/what-beginners-ask-for-and-what-i-tell-them/">
                &lt;p&gt;Being in an IRC help channel lets you meet a lot of people. Many are fresh beginners that just wrote their first lines of CSS and stumbled over something they found strange. When you look at their questions from a perspective you quickly find that many of them are repeated and come back over and over again. This article is an attempt to list a few of the important concepts that people seem to have trouble with.&lt;/p&gt;
&lt;h2 id=&#34;separation&#34;&gt;Separation of content and design&lt;a href=&#34;#separation&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Separation is the fundamental idea that CSS builds upon. Ten years ago there was only one way to make pages that worked across browsers: you mixed everything in one large file and copied that file if you wanted pages that looked similar. Then &lt;a href=&#34;/css/interview-why-did-css-succeed/&#34; title=&#34;Interview with Håkon Wium Lie&#34;&gt;Håkon&lt;/a&gt; and Bert came up with CSS and things got much easier. Their idea is to make the code easier to maintain by extracting everything that has to do with design, put it in an external file and link to that file when we want a certain look. CSS is all about design and HTML is all about content and structure.&lt;/p&gt;
&lt;p&gt;Even though this sounds good in theory there are a lot of cases where it&#39;s hard to determine whether something is design or not. Is the company logo design or content? When you start thinking about those kinds of problems you know you&#39;re on the right track. You can find a couple of examples of the separation I&#39;m talking about in my &lt;a href=&#34;/css/beginners-guide-to-css-and-standards/&#34;&gt;beginners guide&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;clearing&#34;&gt;Clearing floats&lt;a href=&#34;#clearing&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Floats and clearing is another problem almost everyone has in the beginning. What I like to use when I explain how floats work is the old align-attribute on images. Long time ago, when you only could use HTML for design, and wanted the text to &amp;quot;flow around the image&amp;quot; you used:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/files/post-media/image.jpg&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;align&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;right&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The above code is clearly design (placement of the image) so we should use CSS instead of HTML for this.&lt;/p&gt;
&lt;div class=&#34;correct&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;id_of_image&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;CSS is not restricted to float only images, all elements can be floated. This opens up to both new layout methods and confusion. To place three divisions side by side, just give them a width and float them. You can see a layout based on this in my &lt;a href=&#34;/css/simple-css-templates/&#34;&gt;article about layouts&lt;/a&gt; or the &lt;a href=&#34;/files/templates/?style=3columns_float_float_float&amp;cols=3&#34; data-no-instant&gt;3-column example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Clear&lt;/em&gt; is also important to know of. Setting &lt;code&gt;clear: both;&lt;/code&gt; on an element makes it move downwards until it&#39;s below all previous floats. That was how the footer in the above example was made.&lt;/p&gt;
&lt;p&gt;Floats and clears are not always easy to understand though. One thing people often ask about is what&#39;s wrong when their container isn&#39;t expanded to contain everything inside it. Eric Meyer excellently explains both that problem and its solution in the article &lt;a href=&#34;http://www.complexspiral.com/publications/containing-floats/&#34;&gt;Containing Floats&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;validation&#34;&gt;Validation is a timesaver&lt;a href=&#34;#validation&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Why is validation so important? Because I just can&#39;t stand you forgetting your alt attributes? Because I think that valid pages are better than non-valid? No and No. It&#39;s because validation finds the simple errors. If I misspell width or some other property a validation will find it. If I nest my tags incorrectly a validation will find it. If I forget to close a quote in a link? A validation will find it. Validation is a great timesaver because it actually finds all the small errors that humans have trouble finding. To make validation even easier I use the &lt;a href=&#34;http://users.skynet.be/mgueury/mozilla/&#34;&gt;Html Validator extension&lt;/a&gt; for Firefox. A little icon in the bottom right corner tells me when I have an HTML error. Validation is a great tool, use it.&lt;/p&gt;
&lt;h2 id=&#34;accessibility&#34;&gt;Accessibility is not about blind users&lt;a href=&#34;#accessibility&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It could be that I&#39;m trying to explain why someone should add labels to their form. I say something in the lines of:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Me&lt;/strong&gt;: &amp;quot;Not having labels hurts your site’s accessibility&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;User&lt;/strong&gt;: &amp;quot;But I don&#39;t have any blind users on my site!&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Accessibility is about making it easy for as many as possible to access your content. With, often simple, means you can make it much easier for people to access your site. Let me give you some examples or people your can help by thinking about accessibiliy.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
  &lt;th&gt;User&lt;/th&gt;
  &lt;th&gt;How you can help&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
  &lt;td&gt;Partly color blind&lt;/td&gt;
  &lt;td&gt;Don&#39;t use only color to convey information&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;People unable to use a mouse. Either because of some physical disability or simply that they are linux hackers and dislike it.&lt;/td&gt;
  &lt;td&gt;Make sure keyboard navigation works as intended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;Young users or users with another native language than yours&lt;/td&gt;
  &lt;td&gt;Don&#39;t overcomplicate your text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;People with a slow connection&lt;/td&gt;
  &lt;td&gt;Mind the size of your site&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The list could continue for a whole article. People from those groups would very much like to see your site and buy your stuff just like anyone else. Read up on the basics of accessiblity, it helps a lot of people. Robert Johansson has written a nice article about how you could &lt;a href=&#34;http://www.456bereastreet.com/archive/200603/evaluating_website_accessibility_part_1_background_and_preparation/&#34;&gt;evaluate your website&#39;s accessibility&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;harder&#34;&gt;Some things are harder to do with CSS, that does not mean CSS is a bad language&lt;a href=&#34;#harder&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;People that are switching from tables to CSS often complain about what a bad language CSS is for not supporting &lt;em&gt;[insert favourite feature]&lt;/em&gt;. I did so too in the beginning. What makes me like the language is all the other powers it gives me. It is not possible to do everything as easily with CSS as it is with tables. But other things are much easier, and some things aren&#39;t even possible with tables. There are good parts and bad parts and to me the good parts greatly outweigh the bad ones.&lt;/p&gt;
&lt;h2 id=&#34;equal&#34;&gt;Equal height columns&lt;a href=&#34;#equal&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The last thing I&#39;m going to talk about in this article is equal height columns. The problem is that your have two or three columns of content that stretch down the page. You want the columns to stretch as far as the longest column but the content inside does not expand the columns that far.&lt;/p&gt;
&lt;p&gt;This problem is most easily solved by a technique known as &lt;em&gt;faux columns&lt;/em&gt;. Add a container to the columns you have and then add a background image to that container. The image will repeat down that page and make it look like your columns take up exactly as much vertical space. I&#39;ve added a &lt;a href=&#34;/files/templates/?style=faux_columns&amp;cols=3&amp;nofooter=1&#34; data-no-instant&gt;faux column example&lt;/a&gt; for you to look at.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Challenge: What’s the worst you can do?</title>
            <link href="http://friendlybit.com/css/challange-whats-the-worst-you-can-do/" rel="alternate" type="text/html" title="Challenge: What’s the worst you can do?" />
            <published>2006-03-11T16:09:26+01:00</published>
            <updated>2006-03-11T16:09:26+01:00</updated>
            <id>http://friendlybit.com/css/challange-whats-the-worst-you-can-do/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">After reading through the comments on my levels of CSS article I find that I few people seem to think that the article is a way to ridicule beginners. It&#39;s...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/challange-whats-the-worst-you-can-do/">
                &lt;p&gt;After reading through the comments on my &lt;a href=&#34;/css/levels-of-css-knowledge/&#34;&gt;levels of CSS&lt;/a&gt; article I find that I few people seem to think that the article is a way to ridicule beginners. It&#39;s not. It&#39;s a way to document the steps that I think I have climbed. Some people also thought that this set of levels is a good indicator of how good sites you will make. That&#39;s also false. Being Level 5 or 6 in the list means that you are a good &lt;em&gt;coder&lt;/em&gt;, nothing else. It does not mean that a site you make is any good, I&#39;ve seen many sites that have great code but that still makes me want to kill someone. Don&#39;t confuse good web developers with good coders. &amp;quot;Don&#39;t be a &lt;a href=&#34;http://www.molly.com/2006/02/23/how-to-sniff-out-a-rotten-standardista/&#34;&gt;rotten standardista&lt;/a&gt;&amp;quot; as Molly Holzschlag would put it.&lt;/p&gt;
&lt;h2 id=&#34;the-challenge&#34;&gt;The challenge&lt;a href=&#34;#the-challenge&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To give you a perspective of how bad it really could be I&#39;m challenging all the readers of Friendly Bit. It&#39;s kind of a competition (with no prize) about who can make the worst site. The rules are simple; you are to construct a page, using HTML and CSS (and Javascript if you think you need it) that has a design that is as hideous as possible. I want pages that make my eyes bleed, that make small children cry and makes &lt;a href=&#34;http://maddox.xmission.com/&#34;&gt;Maddox&lt;/a&gt; write hate articles about you. Think of all the good things you&#39;ve learnt and do the opposite.&lt;/p&gt;
&lt;h2 id=&#34;inspiration-for-a-truly-hideous-design&#34;&gt;Inspiration for a truly hideous design&lt;a href=&#34;#inspiration-for-a-truly-hideous-design&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I won&#39;t be giving out any prize but what I can do is help you with some ideas of bad code.&lt;/p&gt;
&lt;p&gt;Make use of the &lt;code&gt;&amp;lt;marquee&amp;gt;&lt;/code&gt; tag. It makes any content inside it scroll in the speed and direction you choose. Did you know that you can wrap &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; in a marquee tag? That&#39;s right, your entire page will move automatically. You can also nest several marquee tags inside each other. Ohh yeah!&lt;/p&gt;
&lt;p&gt;Another good tag you can use is the &lt;code&gt;&amp;lt;blink&amp;gt;&lt;/code&gt; tag. Can it be applied to, say, a table? I hear you ask. But of course. You can have a full screen blinking table on your company homepage.&lt;/p&gt;
&lt;p&gt;Continuing with the good ideas we have the oldschool &lt;em&gt;frames&lt;/em&gt; we all have come to like. Did you know that there are no set upper limit on the number of frames you can load? You can have thousands of them! You can even mark up a whole tabular grid with frames alone.&lt;/p&gt;
&lt;p&gt;This challange is about &lt;em&gt;terrible code&lt;/em&gt; as much as it&#39;s about terrible design. So don&#39;t go with well-formed or the basic foundations of HTML. Did you even try putting tags inside other tags? &lt;code&gt;&amp;lt;font &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt; size=&amp;quot;3&amp;quot;&amp;gt;&lt;/code&gt; is quite fantastic don&#39;t you think? Make your page upside down by adding the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; below the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;, but only after you have added your own &lt;code&gt;&amp;lt;neck&amp;gt;&lt;/code&gt; tag to the mix. Surprise me!&lt;/p&gt;
&lt;h2 id=&#34;how-to-accept-the-challenge&#34;&gt;How to accept the challenge&lt;a href=&#34;#how-to-accept-the-challenge&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To join all of this you just have to make the page, put it up on your server and link to it here. Post a link as a comment or simply trackback (link to this post) from your own blog and it will show up here.&lt;/p&gt;
&lt;p&gt;Finally: Don&#39;t forget the lesson behind all this. When you see a site with bad code, know that there&#39;s a lot of much worse sites out there.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Frames or Iframes with CSS</title>
            <link href="http://friendlybit.com/css/frames-or-iframes-with-css/" rel="alternate" type="text/html" title="Frames or Iframes with CSS" />
            <published>2006-02-01T23:50:59+01:00</published>
            <updated>2006-02-01T23:50:59+01:00</updated>
            <id>http://friendlybit.com/css/frames-or-iframes-with-css/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">A frequent request from people new to CSS is trying to get a behaviour similar to frames while only using CSS. Many have read that frames have a lot of...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/frames-or-iframes-with-css/">
                &lt;p&gt;A frequent request from people new to CSS is trying to get a behaviour similar to frames while only using CSS. Many have read that frames have a lot of problems but do not know much more than that. This article will try to explain why frames are bad and what to do about it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#why&#34;&gt;Why are traditional frames such a bad thing?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#scrollbar&#34;&gt;Getting a scrollbar on any element using CSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#traditional&#34;&gt;Mimicking traditional frames&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: I&#39;ve updated this technique &lt;a href=&#34;/css/position-fixed-css-templates/&#34;&gt;using position: fixed in a new article&lt;/a&gt;, have a look at those templates instead! (Although this article is still good for background information).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;why&#34;&gt;Why are traditional frames such a bad thing?&lt;a href=&#34;#why&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Let me start by just listing a few bad things about frames.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prevents users from bookmarking&lt;/strong&gt; the exact page they&#39;re on. Instead the bookmark will lead to the frameset. This is clearly not a good choice for larger sites where finding a certain page might be a problem, but even users on smaller sites might find it annoying. I do.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Poor support by some parsers&lt;/strong&gt; leads to problems. Many screen readers, mobile phones, and search engines have problems parsing frames. This means some of your users might miss out on your content.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content order&lt;/strong&gt; problems. Just like with tables, frames give screen readers problems when deciding which order to read the frames. If it reads a 2×2 frameset will not know whether to read the content like two rows or like two columns. The order might be important for understanding the content and frames has nothing built-in to help with that.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Search engines&lt;/strong&gt; might split the ranking up on the different pages. I just discovered this by looking at one of my old pages (no, I won&#39;t show it, it&#39;s terrible :). There, the &lt;a href=&#34;http://www.webworkshop.net/pagerank.html&#34;&gt;PageRank&lt;/a&gt; has been split up on the framed pages and the frameset has no rank whatsoever.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Invalid code&lt;/strong&gt;. If you&#39;re using separate frames for navigation and content your links will need the &lt;code&gt;target&lt;/code&gt; attribute to make links from the navigation frame open in the content frame. That attribute is not supported when using a strict doctype so you will have to use transitional. The doctype won&#39;t matter if you want to get rid of borders cross-browser though, to do that you need invalid markup.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Printing is a problem&lt;/strong&gt;. How should the different frames be handled while printing? There&#39;s no good solution to this.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;People that are good with javascript sometimes say they like frames because they make it possible to save information about the user even though the user clicks links. A variable can be saved in a frame and be accessible to the other frames even after they are reloaded. Another pro-frames reason frequently heard is that it saves overhead since not the entire page gets reloaded.&lt;/p&gt;
&lt;p&gt;Personally I think that the first is a bad reason to use frames. Using server side scripting to save session info is much more robust since that will mean the applications still work if the user reloads the page. The other reason of only reloading a part of the page is nowadays done by using javascript together with XMLHttp (some like to call it AJAX). To me, the bad parts of frames greatly weigh over, even for applications.&lt;/p&gt;
&lt;h2 id=&#34;scrollbar&#34;&gt;Getting a scrollbar on any element using CSS&lt;a href=&#34;#scrollbar&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Aside from all of the above frames are not structure. Think about it. When working with frames you define that you want a couple of rows and columns, which should scroll and which shouldn&#39;t, and which should have borders. These are things that many of us would never dream of doing with tables but some still use frames like that.&lt;/p&gt;
&lt;p&gt;Instead we should define that kind of design in our CSS files. How? By using a few lines of code you can easily limit any element to a certain width/height and let it scroll if the content overflows that size.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Here&amp;#39;s some sample content that I would like to scroll&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;80&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;overflow&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;auto&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It&#39;s easy, you&#39;re saying: &amp;quot;limit the paragraph to this size and give the box a scrollbar if the content gets too big&amp;quot; (Other valid values for overflow are &amp;quot;hidden&amp;quot; and &amp;quot;scroll&amp;quot;. The former just cuts everything that sticks out, that latter adds the scrollbars even if they&#39;re not needed).&lt;/p&gt;
&lt;p&gt;The above method works when you want something that&#39;s similar to iframes but it doesn&#39;t work right away for traditional frames. Those usually span the whole width or height of the page and leave the rest of the page scrolling. But what stops us from taking any element and stretching and placing it like a frame? Nothing. Let&#39;s do it.&lt;/p&gt;
&lt;h2 id=&#34;traditional&#34;&gt;Mimicking traditional frames&lt;a href=&#34;#traditional&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/files/frames/columns.html&#34; data-no-instant&gt;Two columns with left fixed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/files/frames/columns_navright.html&#34; data-no-instant&gt;Two columns with right fixed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/files/frames/rows.html&#34; data-no-instant&gt;Two rows with a fixed top&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The idea here is to use divisions to group our content. Then position those divisions as if they where frames and limit their site and set &lt;code&gt;overflow: auto&lt;/code&gt; like we did above. Frames use the syntax &lt;code&gt;cols=&amp;quot;200,*&amp;quot;&lt;/code&gt; to say that the first column should be 200px wide and the second one &amp;quot;cover what&#39;s left&amp;quot;. The second part is a bit harder to do with CSS.&lt;/p&gt;
&lt;p&gt;There&#39;s no way to say 100%-200px but there&#39;s a trick we can use: floats push the content away. So if we set a width on the left block to 200px and float it left, the other block will be as wide as possible (default for block level elements) but it&#39;s content will be pushed 200px to the right. Here&#39;s an example of &lt;a href=&#34;/files/frames/columns.html&#34; data-no-instant&gt;two columns with a fixed left&lt;/a&gt; in action. By just changing float: left; on navigation to float: right; we get the other example: &lt;a href=&#34;/files/frames/columns_navright.html&#34; data-no-instant&gt;Two columns with the right one fixed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;(Technical note: we don&#39;t need to add any margin-left since &lt;a href=&#34;http://www.mezzoblue.com/archives/2005/03/03/clearance/&#34;&gt;overflow: auto; clears&lt;/a&gt; too).&lt;/p&gt;
&lt;p&gt;The above works well for columns but what if we need rows instead? When using frames we specify &lt;code&gt;rows=&amp;quot;100,*&amp;quot;&lt;/code&gt; and as I said this is not possible directly with CSS. We can&#39;t use the above trick either since we&#39;re dealing with height here. Setting &lt;code&gt;height: 100%&lt;/code&gt; will just make it as high as the window, leaving no space for the other row. The solution here is to cheat a bit. If we make the first column 100px high and the lower one 100% high but then remove the first one from the flow we will be pretty close. The first row will be on top of the other one but that can easily be solved by adding a padding-top the same height as the first row.&lt;/p&gt;
&lt;p&gt;We&#39;re almost there now, one last thing: the latter row scrolls on top of the first one because of the order in the source (latter elements stack on top of earlier ones). So what we do is force the first one on top with position: relative. This solves the problem except that it also covers the scrollbar now. An easy (and ugly fix) is to add a margin-left of 16px to the top column making the scrollbar visible again. Browsers seem to use the same scrollbar width so that&#39;s it, an &lt;a href=&#34;/files/frames/rows.html&#34; data-no-instant&gt;example of frame rows&lt;/a&gt; using CSS.&lt;/p&gt;
&lt;p&gt;I&#39;ve tested this in IE 6, FF 1.5 and Opera 8.5 on WinXP and it seems to work fine. Broken in any other browsers? Let me know through the comments.&lt;/p&gt;
&lt;p&gt;When looking at this I see that this is also a good way to mimick blocks that are &lt;code&gt;position: fixed&lt;/code&gt;, something that doesn&#39;t work in IE. This method might be good in a situation where you need that one.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Google statistics over HTML usage</title>
            <link href="http://friendlybit.com/html/google-statistics-over-html-usage/" rel="alternate" type="text/html" title="Google statistics over HTML usage" />
            <published>2006-01-25T20:56:18+01:00</published>
            <updated>2006-01-25T20:56:18+01:00</updated>
            <id>http://friendlybit.com/html/google-statistics-over-html-usage/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Google Code has done extensive research over the use of HTML today. Since this is Google doing the job they had access to an enormous amount of data, over a...</summary>
            <content type="html" xml:base="http://friendlybit.com/html/google-statistics-over-html-usage/">
                &lt;p&gt;Google Code has done extensive research over the use of HTML today. Since this is Google doing the job they had access to an enormous amount of data, over a billion documents where analysed. What does the report conclude? Pretty much what we already know: people don&#39;t use HTML for structure like its intended.&lt;/p&gt;
&lt;p&gt;Here are some examples of strange usage in the report:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; is used more often than &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt;. No comment.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt; is the ninth most used element. I have serious doubts that this is due to the amount of tabular data on the web.&lt;/li&gt;
&lt;li&gt;The third most used classname is &amp;quot;title&amp;quot; and the fourth &amp;quot;small&amp;quot;. The first could probably be replaced by a header tag, the other one should certainly be set by CSS since it&#39;s style.&lt;/li&gt;
&lt;li&gt;Half of all &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; elements contains the &amp;quot;bgcolor&amp;quot; attribute. If this isn&#39;t style, what is?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report tells a lot about the shape of the web. If I only could get more people to read my &lt;a href=&#34;/css/beginners-guide-to-css-and-standards/&#34;&gt;beginners guide&lt;/a&gt;…&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Building a poker template</title>
            <link href="http://friendlybit.com/css/semantic-poker-template/" rel="alternate" type="text/html" title="Building a poker template" />
            <published>2006-01-23T03:31:06+01:00</published>
            <updated>2006-01-23T03:31:06+01:00</updated>
            <id>http://friendlybit.com/css/semantic-poker-template/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">This is the first article in a series of niche templates I&#39;m building. You can have a look at the finished template before we start if you want. About the...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/semantic-poker-template/">
                &lt;p&gt;This is the first article in a series of &lt;a href=&#34;/css/building-niche-sites-with-standards/&#34;&gt;niche templates&lt;/a&gt; I&#39;m building. You can have a look at the &lt;a href=&#34;/files/poker/?style=positioning&amp;style2=decoration&#34; data-no-instant&gt;finished template&lt;/a&gt; before we start if you want.&lt;/p&gt;
&lt;h2 id=&#34;about-the-niche&#34;&gt;About the niche&lt;a href=&#34;#about-the-niche&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Today&#39;s topic is &lt;em&gt;Poker sites&lt;/em&gt;. Poker, and card games overall, are hot these days and they are all over news. There are TV commercials for big international gambling sites even here in Sweden. Being in that kind of spotlight and receiving massive traffic must make those sites better than the rest, don&#39;t you think? Let&#39;s &lt;a href=&#34;http://www.google.com/search?q=poker&#34;&gt;google for &amp;quot;poker&amp;quot;&lt;/a&gt; and have a look at the top 10 results (23 Jan 2006).&lt;/p&gt;
&lt;table summary=&#34;A look at the web standards compliance of poker sites&#34;&gt;
  &lt;tr&gt;
    &lt;th title=&#34;Placement in Google&#34;&gt;
      #
    &lt;/th&gt;
    &lt;th&gt;
      Site name
    &lt;/th&gt;
    &lt;th&gt;
      Doctype
    &lt;/th&gt;
    &lt;th&gt;
      Validation errors
    &lt;/th&gt;
    &lt;th&gt;
      Layout method
    &lt;/th&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      1
    &lt;/th&gt;
    &lt;td&gt;
      Pokerroom.com
    &lt;/td&gt;
    &lt;td class=&#34;almost&#34;&gt;
      Transitional
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      22 errors
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      Tables
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      2
    &lt;/th&gt;
    &lt;td&gt;
      Poker.com
    &lt;/td&gt;
    &lt;td class=&#34;correct&#34;&gt;
      Strict
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      62 errors
    &lt;/td&gt;
    &lt;td class=&#34;correct&#34;&gt;
      CSS
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      3
    &lt;/th&gt;
    &lt;td&gt;
      Pokerstars.com
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      None
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      48 errors
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      Tables
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      4
    &lt;/th&gt;
    &lt;td&gt;
      Pokerpages.com
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      None
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      336 errors
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      Tables
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      5
    &lt;/th&gt;
    &lt;td&gt;
      Pagat.com Poker
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      None
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      52 errors*
    &lt;/td&gt;
    &lt;td class=&#34;correct&#34;&gt;
      None
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      6
    &lt;/th&gt;
    &lt;td&gt;
      Worldpokertour.com
    &lt;/td&gt;
    &lt;td class=&#34;almost&#34;&gt;
      Transitional
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      56 errors
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      Tables
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      7
    &lt;/th&gt;
    &lt;td&gt;
      Pacificpoker.com
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      None
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      72 errors
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      Tables
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      8
    &lt;/th&gt;
    &lt;td&gt;
      Partypoker.com
    &lt;/td&gt;
    &lt;td class=&#34;almost&#34;&gt;
      Transitional
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      22 errors*
    &lt;/td&gt;
    &lt;td class=&#34;correct&#34;&gt;
      CSS
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      9
    &lt;/th&gt;
    &lt;td&gt;
      Paradisepoker.com
    &lt;/td&gt;
    &lt;td class=&#34;almost&#34;&gt;
      Transitional
    &lt;/td&gt;
    &lt;td class=&#34;almost&#34;&gt;
      1 error
    &lt;/td&gt;
    &lt;td class=&#34;correct&#34;&gt;
      CSS
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;th&gt;
      10
    &lt;/th&gt;
    &lt;td&gt;
      Homepoker.com
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      Broken
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      146 errors
    &lt;/td&gt;
    &lt;td class=&#34;incorrect&#34;&gt;
      Tables
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;p class=&#34;first&#34;&gt;
  *) These sites required that we set a character set manually to even see how many errors there were.
&lt;/p&gt;

&lt;p&gt;What do we see up there? Poker.com and Paradisepoker.com do pretty well. Poker.com uses Strict doctype which means that their validation is stricter than the others, but 62 errors is still too much. Paradisepoker.com almost validates as Transitional which is a good thing compared to the other sites in the list.&lt;/p&gt;
&lt;p&gt;Three sites use CSS for their layouts instead of tables. This is a good thing and they should be commended for it. However, that does not mean that they can&#39;t be &lt;em&gt;better&lt;/em&gt;. All three with CSS layouts overuse divisions and spans terribly, often making the page a mess without CSS turned on.&lt;/p&gt;
&lt;p&gt;Does this guy do nothing more than whine? I hear you ask. Yes I do. What I will do is nothing special; any one of you reading this could have done it yourself. I&#39;m going to build a simple HTML document mimicking the front page of a poker site. If you are planning to build a site like that (or even if you are the developer of one of the sites above), you should definitely keep reading. The idea with all of this is to make it easier for people to follow the standards.&lt;/p&gt;
&lt;p&gt;I will only include the front page of the site but it won&#39;t be hard to transform it to something simpler later on. Remember the purpose here: to show that it&#39;s possible to combine logical markup, valid code and make it look just the way you want it to. We need some kind of content though, so let&#39;s start with that.&lt;/p&gt;
&lt;h2 id=&#34;plan-what-features-you-want&#34;&gt;Plan what features you want&lt;a href=&#34;#plan-what-features-you-want&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The features for the template will be my picks of the top10 above. Let&#39;s put some time on analyzing what features a decent poker site has.&lt;/p&gt;
&lt;p&gt;The purpose of most of the sites seems to be to &lt;em&gt;get people to play&lt;/em&gt; on their site. Most have some kind of client that is easily available from the front page and that button is the most important part of the page. Aside from that we need features to build a community around the game. Let&#39;s pick &lt;em&gt;a forum&lt;/em&gt; as our community builder. Beginners need to have somewhere to &lt;em&gt;learn the basics&lt;/em&gt; and everyone might need &lt;em&gt;support&lt;/em&gt; from experienced staff sometimes. To build a good community you might also need news of some kind, displaying the largest prizes might give the site more players. Finally, all respectable sites have some info &lt;em&gt;about the company&lt;/em&gt; behind it and if the site is big, they have a &lt;em&gt;search&lt;/em&gt;. We want to earn some money too so let&#39;s add in a little advertisement. Sum this up in a list with descriptions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Play poker button&lt;/strong&gt;: One big button telling people to click it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Beginners guide and support&lt;/strong&gt;: Show on the front page that you don&#39;t need to be a pro to play and provide a quote from a professional player that illustrates this. Link directly into the guide to show experienced users that there might be something there for them too. Add frequently asked questions to this part too. Give users somewhere to turn to if they have problems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;News&lt;/strong&gt;: Front page should link to a couple of top news and at the bottom have link to a dedicated news-page with more info.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Forum&lt;/strong&gt;: Users should feel that this is a site with lots of people. Link to the topics in the forum most posted in to show them just that. This site is live and kicking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Search&lt;/strong&gt;: Search might be important both if you look for either a poker term or for a feature on the site. Add search for both the forums and the news here and let people decide which of them to search.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;About us&lt;/strong&gt;: Trust is important if you want people to part from their money. Put a picture of the staff online and quote reviews and happy customers (Don&#39;t fake this stuff. Never)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Advertisement (Ads)&lt;/strong&gt;: Ads need needs to be marked up as what they are. We want users to click on the ads only if they like the service the advertisers are serving&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We now need to transform this to HTML somehow. When you do this yourself, try to think as little about the color, fonts and such as possible. Focus on what &lt;em&gt;content&lt;/em&gt; you want to show your users and build the HTML based on that.&lt;/p&gt;
&lt;p&gt;On the next page we will get down to business and start coding. You want to see what I&#39;m talking about don&#39;t you?&lt;/p&gt;
&lt;p&gt;Time has come to go through the list of features and write the code for them. The question which we should keep in mind here is &amp;quot;What content do I have?&amp;quot;.&lt;/p&gt;
&lt;h2 id=&#34;play-poker-button&#34;&gt;Play poker button&lt;a href=&#34;#play-poker-button&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ok. We want a poker button. Some people prefer to use&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;input type=&amp;quot;submit&amp;quot; /&amp;gt;&lt;/code&gt; for all kinds of buttons. Those buttons are made for submitting a form though, and that&#39;s not what we want here. When you think of it, is this &amp;quot;Play button&amp;quot; any different from a link? I think not. We will make it look like a button with CSS later on. Let&#39;s use the HTML of a simple link:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;play-poker.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Play poker&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;advertisement&#34;&gt;Advertisement&lt;a href=&#34;#advertisement&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;All sites cost money to run and getting that money is often done with some kind of advertisement on the site. What kind of ads should we use for this template? Looking at the top10 it seems that images are more common than text so let&#39;s use images. Don&#39;t forget to let advertisers specify alternate text to their images so you don&#39;t have to make something up for the alt attribute.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Advertisement&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;url_to_advertisers_site.com&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
   &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/files/post-media/play-roulette-online.png&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;alt&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Advertisement: Play roulette online&amp;quot;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;beginners-guide&#34;&gt;Beginners guide&lt;a href=&#34;#beginners-guide&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To get beginners to play on our site we need to at least teach them the basics. How? People don&#39;t like manuals and they are often hard to navigate in. The best would be if no manual were needed at all, but let&#39;s be realistic, some people will still need help. A good approach is to use questions in natural language to lure people to read the guide. Keep it simple and easy to read. To mark that this is the beginners guide we add a header with that name in. Don&#39;t be tempted to use any other header than h2, the h1 will be used for the name of the site and this is a second level header, nothing else. To mark up the questions we use a paragraph of text with links. At the end we add a link to more information. The class &amp;quot;more&amp;quot; there is just a way to say that this paragraph is different from the one above.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Beginners guide&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
If you are a poker beginner you might want to start by reading
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;help/rules-of-poker.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;the rules&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;. When you are done with that
you can &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;#help/register.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;register an account&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; with us. Don&amp;#39;t worry,
to join is free of charge and you can even win some money in our
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;help/monthly-tournaments.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;monthly tournaments&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;.
More questions are answered in the
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;help/frequently-asked-questions.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;frequently asked questions&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; section
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;news&#34;&gt;News&lt;a href=&#34;#news&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;People playing poker are probably interested in poker news too. By having news on your site your users don&#39;t have to go somewhere else looking for them. This will be a separate section so we should add a header here too, h2 is appropriate. The news items themselves are just items in an unordered list, so let&#39;s use the HTML for that, &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;. End it all with a link to the news page that we wrap it in a classed paragraph like before.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;News&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;23 feb: &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;news/highest-prize-ever&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Highest Prize Ever paid...&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;5 jan: &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;news/caught-cheating&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Top player caught cheating&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;10 dec: &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;news/how-to-improve&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;How to improve your betting&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;1 nov: &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;news/pokercompany-featured&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;PokerCompany featured on...&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;30 okt: &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;news/murkus-baltomi&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Murkus Baltomi the new...&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;24 apr: &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;news/planned-downtime&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Planned downtime on Sunday&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
We maintain an &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;#news/&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;news archive&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; too.
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;forum&#34;&gt;Forum&lt;a href=&#34;#forum&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The forum posts can be handled much like the news. A header, a simple list, this time ordered by with the most active on top. End it with a now familiar classed paragraph.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Forum&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;forum/forum.php?topic=7&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Best strategy with one...&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; - 124 repl.&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;forum/forum.php?topic=572&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Anyone know of a store...?&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; - 115 repl.&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;forum/forum.php?topic=17&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;What&amp;#39;s the name of the...&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; - 89 repl.&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;forum/forum.php?topic=67&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;What your biggest pot?&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; - 51 repl.&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;forum/forum.php?topic=23&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;There was this guy in...&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; - 49 repl.&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;forum/forum.php?topic=325&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Help me get my...&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; - 36 repl.&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;#forum/&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Our forums&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; are always filled with people to answer your questions.
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;search&#34;&gt;Search&lt;a href=&#34;#search&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The bigger the site gets the more important it becomes to get a site search. A search clearly resembles a form; the user fills in a few values and sends them to the site. A simple textbox for the search query with a submit following it.&lt;/p&gt;
&lt;p&gt;Just in case you&#39;re not familiar with the modern way to make a good form I&#39;ll go through the elements used below briefly.&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt; groups similar form elements together. For example, if you have two separate fields for first name and last name, you can signal that they are both part of the full name by adding a fieldset around both of them.&lt;/p&gt;
&lt;p&gt;Using &lt;code&gt;&amp;lt;legend&amp;gt;&lt;/code&gt; we then tell what the meaning of the fieldset is. For the previous example we could use &amp;quot;Full name&amp;quot;.&lt;/p&gt;
&lt;p&gt;The last &amp;quot;new&amp;quot; tag here is the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;. It simply shows that there are a relation between the text in front of the button and the input box right next to it. A good thing about this relation is that it enables you to click on the label and have the input selected; something that is particularly useful with small radio buttons. This is what the HTML looks like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;action&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;search.php&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;method&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;get&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;fieldset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;legend&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Site search&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;legend&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;phrase&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Search: &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;phrase&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;search&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;fieldset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;about-us&#34;&gt;About us&lt;a href=&#34;#about-us&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Everyone wants to know who they&#39;re dealing with before they make a purchase of some kind (I believe that&#39;s one of the reasons some e-shops have problems, but that&#39;s a completely different story). Anyways, it&#39;s easy for you to put up an image and some quotes from people that are happy with your services, so do it. The header and &amp;quot;more&amp;quot; paragraph should be familiar by now.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;About us&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
PokerCompany has been in the business since 1997 and is...
Want to read &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;about/&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;more about us&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;?
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;On the next page we will take all the pieces of HTML and put them together. It&#39;s getting interesting, don&#39;t you think?&lt;/p&gt;
&lt;h2 id=&#34;what-a-structured-document-looks-like&#34;&gt;What a structured document looks like&lt;a href=&#34;#what-a-structured-document-looks-like&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We have carefully constructed all the markup for the important parts of the site. Notice that we&#39;ve said nothing about the look of it yet, we’re strictly dealing with content.&lt;/p&gt;
&lt;p&gt;We will first add all a good doctype (strict), character encoding and the other things needed for validation. I will not go over this again, it was described a couple of weeks ago in the &lt;a href=&#34;/css/beginners-guide-to-css-and-standards/&#34;&gt;beginner&#39;s guide&lt;/a&gt;. This is just copy and paste, so don&#39;t skip this part.&lt;/p&gt;
&lt;p&gt;Aside from that we also need to add some &amp;quot;hooks&amp;quot;, namely classes and ids, to make it easier to style the document (If you don&#39;t know what those two are I recommend you read through the &lt;a href=&#34;/css/beginners-guide-to-css-and-standards/&#34;&gt;beginners guide&lt;/a&gt; before continuing). Good class and id names have something in common: they describe the content. So using &amp;quot;tinyredbar&amp;quot; is a bad name and using &amp;quot;latestnews&amp;quot; is a good one.&lt;/p&gt;
&lt;p&gt;The basics, the bits of HTML we constructed above and the hooks, together form a &lt;a href=&#34;/files/poker/&#34; data-no-instant&gt;good logical structure&lt;/a&gt; to start with. When looking at that page you will notice that it doesn&#39;t &lt;em&gt;look&lt;/em&gt; pretty. When you view the source of it you will see though - that&#39;s what I want to see when I look at the source of your front page. I get all warm when thinking about it; pure, logical, and accessible content. It&#39;s now time to position things where we want them.&lt;/p&gt;
&lt;h2 id=&#34;apply-some-fancy-css&#34;&gt;Apply some fancy CSS&lt;a href=&#34;#apply-some-fancy-css&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For me the design part always starts with an image program of some sort (Macromedia Fireworks lately for its ease of use). After a while of fiddling around with images and colors I decided to go for something like &lt;a href=&#34;/files/poker/poker-draft.jpg&#34; data-no-instant&gt;this draft&lt;/a&gt; (Note that I&#39;m a programmer rather than a designer so don&#39;t expect wonders here :).&lt;/p&gt;
&lt;p&gt;When you site there with your image in front of you and are on your way to start with the CSS there is one thing you should remember: &lt;em&gt;do the positioning before you do the decoration&lt;/em&gt;. The positioning is the hard part and it &lt;strong&gt;will&lt;/strong&gt; get even harder if you start to mix in colors and fonts. Let&#39;s all follow what I just said and start with the positioning.&lt;/p&gt;
&lt;p&gt;Think of every tag you have on your page as a little box. By &lt;a href=&#34;/files/poker/?style=borders&#34; data-no-instant&gt;enabling borders&lt;/a&gt; on all your elements you can get a good idea of what I&#39;m talking about. When deciding how to position these boxes it&#39;s always wise to start to look at &amp;quot;the flow&amp;quot; of the document. The flow is what you just saw when you looked at the structure above, content is just stacked on top of each other and most tags occupy the full width. By using some clever combinations of floats, clears and widths/heights it is possible to things to line up like we want.&lt;/p&gt;
&lt;h2 id=&#34;positioning-the-header&#34;&gt;Positioning the header&lt;a href=&#34;#positioning-the-header&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Let&#39;s start by &lt;a href=&#34;/files/poker/poker-draft.png&#34; data-no-instant&gt;looking at the top&lt;/a&gt;. There seems to be four boxes here: a company name, company info, statistics, and the play button. The big image to the right can be added as a background, so we&#39;ll wait with that one. The first two boxes just need a smaller width to be where we want them (compare with how they where positioned in default flow). The last two ones need to be floated left and given a width (this will place them side by side).&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;header&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;65&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;400&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;header&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;400&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;header&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;130&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;header&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;display&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;block&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;84&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;261&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;positioning-the-navigation&#34;&gt;Positioning the navigation&lt;a href=&#34;#positioning-the-navigation&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Next up we will deal with the navigation and search. Start by adding &lt;code&gt;clear: both&lt;/code&gt; to the navigation to make sure we are below any floats from earlier in the code. To make the navigation list horizontal we add &lt;code&gt;display: inline;&lt;/code&gt; to all list items. We complete the navigation by setting a width on the list and floating it left.&lt;/p&gt;
&lt;p&gt;The search box is a bit harder. All that info won&#39;t fit in the tiny space we have left so my idea is that we hide the fieldset, legend and label. &amp;quot;Why go through the fuzz of adding them and then hiding?&amp;quot;, I hear you shout. Relax. They&#39;re there because they help users that surf the site with CSS turned off, people like your rich grandmother (using Netscape 4), blind users (using screen readers) and Google. Visual users still know that the textbox is for searching because of the &amp;quot;Search&amp;quot; on the button afterwards, so we&#39;re not hiding important information. Ohh, and the header won&#39;t fit our design either so let&#39;s hide that too.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;clear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;both&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;41&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;720&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;list-style&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;none&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;400&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;display&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;inline&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;250&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;legend&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;position&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;absolute&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;-10000&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;text-indent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;-10000&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;line-height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;fieldset&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;border&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;none&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;positioning-the-advertisements&#34;&gt;Positioning the advertisements&lt;a href=&#34;#positioning-the-advertisements&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ahhh, &lt;acronym title=&#34;advertisements&#34;&gt;ads&lt;/acronym&gt;, both hated and loved at the same time. Not to include ads on a big site like this would just look strange. Let&#39;s position it like we want. First move it down below the navigation by clearing. Then float it right to get it out of the way from the content below.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;adverts&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;clear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;both&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;positioning-the-content&#34;&gt;Positioning the content&lt;a href=&#34;#positioning-the-content&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is going well; the content is next up for positioning. Note that I &lt;a href=&#34;/files/poker/&#34; data-no-instant&gt;added a couple of divisions&lt;/a&gt; to this part of the HTML when merging. They will come to good use now as holders of the four sections. Each of the boxes is given a specific width and height and gets floated left.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;240&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Phew, this feels like a whole days work doesn&#39;t it? On the last page of this tutorial we will put all positioning together and show an example of how everything looks when decorated. Click next below.&lt;/p&gt;
&lt;h2 id=&#34;putting-it-all-together&#34;&gt;Putting it all together&lt;a href=&#34;#putting-it-all-together&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Now it&#39;s time to take all these small parts of CSS, put them in a CSS-file and &lt;a href=&#34;/files/poker/?style=positioning&#34; data-no-instant&gt;apply it on the structure&lt;/a&gt; we had before positioned. Can you &lt;a href=&#34;/files/poker/positioning.css&#34; data-no-instant&gt;recognize the different parts&lt;/a&gt; from the previous page?&lt;/p&gt;
&lt;p&gt;I could bore you to death by explaining every little margin in the decoration step but I won&#39;t. Instead I will just show you the prettied up version of the site. You can have a look at the &lt;a href=&#34;/files/poker/decoration.css&#34; data-no-instant&gt;second CSS file used&lt;/a&gt; if you want.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&#34;/files/poker/?style=positioning&amp;style2=decoration&#34; data-no-instant&gt;Final version of the site&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let&#39;s have a look at the same properties we looked at in the beginning of this article:&lt;/p&gt;
&lt;table summary=&#34;A look at the web standards compliance of the template&#34;&gt;
  &lt;tr&gt;
    &lt;th&gt;
      Site name
    &lt;/th&gt;
    &lt;th&gt;
      Doctype
    &lt;/th&gt;
    &lt;th&gt;
      Validation errors
    &lt;/th&gt;
    &lt;th&gt;
      Layout method
    &lt;/th&gt;
  &lt;/tr&gt;

  &lt;tr&gt;
    &lt;td&gt;
      Friendlybit template
    &lt;/td&gt;
    &lt;td class=&#34;correct&#34;&gt;
      Strict
    &lt;/td&gt;
    &lt;td class=&#34;correct&#34;&gt;
      0 errors
    &lt;/td&gt;
    &lt;td class=&#34;correct&#34;&gt;
      CSS
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;a href=&#34;#summary&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I hope this tutorial has showed you that CSS far from rocket science; could you not have done this yourself? The web really needs to be freshened up and made accessible for everyone, and with your help it can. Do your part by telling your friends, by holding a short presentation where you work, and by supporting webmaster you know work like this. Use your imagination, how can you make people understand?&lt;/p&gt;
&lt;p&gt;Still here? Ok. If you&#39;re uncertain, ask yourself: can you afford to be left behind?&lt;/p&gt;
&lt;p&gt;I hope this article gave you some insight to the development of a poker site. This article was the first is a series of articles about &lt;a href=&#34;/css/building-niche-sites-with-standards/&#34;&gt;niche templates&lt;/a&gt; so be sure to check back for more. Any comments?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Building niche sites with standards</title>
            <link href="http://friendlybit.com/css/building-niche-sites-with-standards/" rel="alternate" type="text/html" title="Building niche sites with standards" />
            <published>2006-01-23T03:30:56+01:00</published>
            <updated>2006-01-23T03:30:56+01:00</updated>
            <id>http://friendlybit.com/css/building-niche-sites-with-standards/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;m starting a new series of articles here at Friendly Bit. Through the use of web standards I will build a couple of niched sites and walk you through...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/building-niche-sites-with-standards/">
                &lt;p&gt;I&#39;m starting a new series of articles here at Friendly Bit. Through the use of web standards I will build a couple of niched sites and walk you through every step of the process. My hope is that this will make it easier for at least a few of you out there to understand what this web standards fuzz is all about. The use of web standards together with your creativity will make building websites fun again.&lt;/p&gt;
&lt;p&gt;The first niche examined is &lt;em&gt;online poker&lt;/em&gt;. The examination ended in a tutorial on &lt;a href=&#34;/css/semantic-poker-template/&#34;&gt;how to build a poker site&lt;/a&gt;. What are you waiting for? Go read it!&lt;/p&gt;
&lt;p&gt;My hope is that the templates will spread all the way to the niche markets they are made for. I appreciate any help with that. No matter what, I hope they will be great articles to learn from. Do you have anything to add? Use the comments.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Line Breaking With Javascript</title>
            <link href="http://friendlybit.com/js/line-breaking-with-javascript/" rel="alternate" type="text/html" title="Line Breaking With Javascript" />
            <published>2006-01-22T00:00:00+01:00</published>
            <updated>2006-01-22T00:00:00+01:00</updated>
            <id>http://friendlybit.com/js/line-breaking-with-javascript/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Over the years there have been numerous suggestions of different ways of doing line breaks on the web. Browser incompatibilities, lack of support for...</summary>
            <content type="html" xml:base="http://friendlybit.com/js/line-breaking-with-javascript/">
                &lt;p&gt;Over the years there have been numerous suggestions of different ways of doing line breaks on the web. Browser incompatibilities, lack of support for standardized features, and the creation of browser specific features all helps in making it incredibly difficult. Searching and reading for a while quickly brought me to think the best current solution is &lt;a href=&#34;http://www.quirksmode.org/blog/archives/2005/06/quirks_mode_and_1.html&#34;&gt;quirksmode&#39;s wbr&lt;/a&gt;. It seems quite well supported but has two major flaws:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;wbr&amp;gt;&lt;/code&gt; is not valid HTML&lt;/li&gt;
&lt;li&gt;The suggested solution does not work in Safari&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So off I went to find a better one. I started trying some different combinations of spaces marked up with &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; tags and I tried some nifty CSS tricks before it hit me - this should be done with javascript. Javascript has wide browser support and after some research (and help from the people in EFNet #javascript) I actually got a &lt;a href=&#34;/files/js-linebreak/&#34; data-no-instant&gt;working example&lt;/a&gt; up. I have been able to test it in FF 1.5/Win, IE 5.5/Win, IE 6/Win, Opera 8.51/Win+Mac, and Safari 2.0.3/Mac and everything seems to work fine in all of them.&lt;/p&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&lt;a href=&#34;#how-it-works&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The idea here is to add ordinary &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;s and using javascript to measure the length of the text. The user gives a piece of text and a width in pixels and the script returns the text with breaks inserted.&lt;/p&gt;
&lt;p&gt;The hard part is to find at which letter we should break. My first idea was to just loop over the text and keep track of the width in pixels. When we get over the given width, back one step and add a break at that position. But this will be slow for small font-sizes and wide columns so let&#39;s do something faster. Instead of looping through all letters we can use &lt;a href=&#34;http://en.wikipedia.org/wiki/Binary_search&#34;&gt;Binary Search&lt;/a&gt; (check the link if you&#39;re not familiar with it, it&#39;s good to know). This makes for a lot less calls.&lt;/p&gt;
&lt;p&gt;We need a small change to the algorithm since we won&#39;t be able to find the exact width we&#39;re looking for (a letter is wider than 1px). Instead we break when we&#39;re down to knowing that it&#39;s between two letters. We then return the first letter&#39;s position. Here is code:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;JS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;binSearch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;searchLen&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;lastBreakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;Math&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;abs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;lastBreakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;lastBreakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;Math&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;floor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;searchLen&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getTextWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;substring&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;Math&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;min&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;lastBreakPos&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The code above uses &lt;code&gt;getTextWidth()&lt;/code&gt; to get the width of a piece of text. &lt;code&gt;getTextWidth()&lt;/code&gt; makes use of the &lt;code&gt;offsetWidth&lt;/code&gt; property to get the width of a piece of text. Problem is that only elements that are rendered have the property set. This means we need to add it to the page, measure it, and then remove it. This code does just that:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;JS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getTextWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;ea&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;createElement&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;span&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;ea&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;innerHTML&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;appendChild&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;ea&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;len&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;ea&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;offsetWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;removeChild&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;ea&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;len&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Good. We now have two nice helper functions to handle all the hard work. Now we only need some code to actually split the text and add the breaks. We do this by using &lt;code&gt;binSearch()&lt;/code&gt; to fetch where the next break should be. &lt;code&gt;binSearch()&lt;/code&gt; returns an index and we split the line and add the first part (including a break) to a buffer. We then repeat the same procedure on the last part of the string. We keep splitting until &lt;code&gt;getTextWidth()&lt;/code&gt; tells us we&#39;re done.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;JS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;linebreak&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;maxLen&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getTextWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;maxLen&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getTextWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;maxLen&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;binSearch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;maxLen&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;substring&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;substring&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;breakPos&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;part2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It&#39;s now time to use the function we have. The first line selects what elements we want to wrap. You can replace this with a loop if you want if you need to go over all the paragraphs in your document. The second line just fetches everything inside the paragraph and sends it to &lt;code&gt;linebreak()&lt;/code&gt; for wrapping. The two lines are then made to trigger when the document is ready loading.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;JS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;onload&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByTagName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;p&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;innerHTML&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;linebreak&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;innerHTML&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;A &lt;a href=&#34;/files/js-linebreak/&#34; data-no-instant&gt;working example&lt;/a&gt; is available that shows what it can do. So, what do you think? Could this be the best solution so far to handling line breaks?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Make a tooltip out of some columns in a table</title>
            <link href="http://friendlybit.com/css/make-a-tooltip-out-of-some-columns-in-a-table/" rel="alternate" type="text/html" title="Make a tooltip out of some columns in a table" />
            <published>2006-01-06T01:16:59+01:00</published>
            <updated>2006-01-06T01:16:59+01:00</updated>
            <id>http://friendlybit.com/css/make-a-tooltip-out-of-some-columns-in-a-table/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">A worried user joins the #CSS channel on EFNet. He has a big problem with the site he&#39;s currently working on and wonders if there might be a problem with...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/make-a-tooltip-out-of-some-columns-in-a-table/">
                &lt;p&gt;A worried user joins the #CSS channel on EFNet. He has a big problem with the site he&#39;s currently working on and wonders if there might be a problem with his markup. Let&#39;s see what he wants.&lt;/p&gt;
&lt;p&gt;The site sells some kind of houses and each house has a few &amp;quot;options&amp;quot; (let&#39;s pretend a bigger door is one option) that the user should be able to select among. Each of these options has a name and costs a certain amount of money. When you move your mouse over one of the options, he wants more info to pop up in a small box. In the box there should be an image, a store name and strange number. What HTML should he use to mark that up?&lt;/p&gt;
&lt;p&gt;We talked for a while and thought about definition lists containing a div with the extra info in, perhaps a two-column table with a div in the second column? After looking again it became pretty clear, if we just look at his data and not think about the design, all that was left was one big table. Everything that he wants in the tooltip are things that could as well be shown in a big table. So why not use exactly that markup and then use javascript to make some cells only pop up when the row was hovered?&lt;/p&gt;
&lt;p&gt;This is the markup I propose:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;Options for your house&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;thead&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Option&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Price&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Image&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Store&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;SKU#&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;thead&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tbody&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Bush&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;$3&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip a1&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/files/post-media/bush.jpg&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;alt&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;An alabama bush&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip a2&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Alabama&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip a3&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;#23535151&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Bush&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;$3&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip a1&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;/files/post-media/bush.jpg&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;alt&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;An alabama bush&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip a2&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Alabama&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;tooltip a3&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;#23535151&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tbody&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;What you see there is a plain five column table with some classes spread out to make it easier to fetch what we want with the javascript later on. The whole table is given the id &amp;quot;info&amp;quot;, this makes us able to separate it from other tables on the same page. Each cell that are going to be in the tooltip get the class &amp;quot;tooltip&amp;quot; and an aditional a1-a3 class that simply is used to position the specific cell later on.&lt;/p&gt;
&lt;p&gt;Next we need to do two of things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Loop over the table and hide everything with the class &amp;quot;tooltip&amp;quot;&lt;/li&gt;
&lt;li&gt;Loop over all table rows and add a mouseover function to each of them that makes them show all hidden cells in that particular row&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To fetch all elements that has a certain className we will use Jonathan Snook&#39;s fabulous getElementsByClassName. It takes two arguments, the element whose children it should loop through and the className it should look for. The function looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;JS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByClassName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;node&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;classname&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[];&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;re&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;ow&#34;&gt;new&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;RegExp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\\b&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;classname&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\\b&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;els&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;node&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByTagName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;j&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;els&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;ij&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;re&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;test&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;els&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;push&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;els&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Next we need to write the code that fulfils the list we wrote previously:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;JS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;// Hide all classes with the className &amp;quot;tooltip&amp;quot;&lt;/span&gt;
&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;tooltips&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByClassName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByTagName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;body&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;tooltip&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;tooltips&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;tooltips&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot; hide&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;

&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;tbodies&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByTagName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;tbody&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;tbodies&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;trows&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;tbodies&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByTagName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;tr&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;// Add a function to each tr that makes it show it&amp;#39;s cells on mouseover&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;j&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;j&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;trows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;j&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;trows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;j&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;onmouseover&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;childtooltips&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByClassName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;tooltip&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;childtooltips&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;childtooltips&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot; hooover&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;// And hides all child cells on mouseout&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;trows&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;j&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;onmouseout&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;childtooltips&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementsByClassName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;tooltip&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;childtooltips&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;childtooltips&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;               &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;childtooltips&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;k&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;replace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;ow&#34;&gt;new&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;RegExp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot; hooover\\b&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;A note here is that we don&#39;t loop over the first table row. That one contains the table headers and shouldn&#39;t react to us hovering it.&lt;/p&gt;
&lt;p&gt;Last but not least we need a few lines of CSS to make the page behave like we want it to. Without either Javascript or CSS enabled a plain table should be shown with all cells visible. If you have both enabled you don&#39;t want the cells that contain the tooltip to take up space in the table. Here&#39;s the code:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;hide&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;-10000&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;position&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;absolute&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;hooover&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;80&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;position&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;relative&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;a1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;border&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;solid&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Black&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;300&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;a2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;padding&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;120&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;a3&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;padding&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &amp;quot;hide&amp;quot; class is added to any element with the class &amp;quot;tooltip&amp;quot;. Why not make the tooltip class hide the cells right away you ask? The answer is that then a non js user would not see those cells at all. This way we get the best of both worlds. To remove the hidden cells from taking up space we remove them from the flow with &lt;code&gt;position: absolute;&lt;/code&gt; and to hide them we use &lt;code&gt;left: -10000px&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &amp;quot;hooover&amp;quot; class get enabled when we mouseover one of the table rows. It just sets the left value to a far more visible 100px. Lastly we set some styles on the a1-a3 classes that makes the tooltip look a little better. We use a1 as a background and place the other two classes on top of it to make it look like they are in the same box.&lt;/p&gt;
&lt;p&gt;And that&#39;s it, a &lt;a href=&#34;/files/table-tooltip/&#34; data-no-instant&gt;table turned into a tooltip&lt;/a&gt;, another user is a little bit happier and all would be fine... Unless of course the user had left the channel before I could show him my solution. Damn.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Beginner’s guide to CSS</title>
            <link href="http://friendlybit.com/css/beginners-guide-to-css-and-standards/" rel="alternate" type="text/html" title="Beginner’s guide to CSS" />
            <published>2006-01-05T18:11:00+01:00</published>
            <updated>2006-01-05T18:11:00+01:00</updated>
            <id>http://friendlybit.com/css/beginners-guide-to-css-and-standards/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">In the chat channel I&#39;m in, I get to talk to people on a daily basis that have never used CSS before, or are at the very beginning of learning it.. This...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/beginners-guide-to-css-and-standards/">
                &lt;p&gt;In the chat channel I&#39;m in, I get to talk to people on a daily basis that have never used &lt;acronym title=&#34;Cascading StyleSheets&#34;&gt;CSS&lt;/acronym&gt; before, or are at the very beginning of learning it.. This article teaches all the basics you need to make your first CSS powered website. It is aimed at people that know a little &lt;acronym title=&#34;HyperText Markup Language&#34;&gt;HTML&lt;/acronym&gt;, and maybe have made a few websites themselves. Let&#39;s get started.&lt;/p&gt;
&lt;h2 id=&#34;what&#34;&gt;What is CSS?&lt;a href=&#34;#what&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;CSS is a language that adds style (colors, images, borders, margins…) to your site. It&#39;s really that simple. CSS is not used to put any content on your site, it&#39;s just there to take the content you have and make it pretty. First thing you do is link a CSS-file to your HTML document. Do this by adding this line:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;link&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;rel&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;style.css&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The line should be placed in between your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tags. If you have several pages you could add the exact same line to all of them and they will all use the same stylesheet, but more about that later. Let&#39;s look inside the file &amp;quot;style.css&amp;quot; we just linked to.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;font-size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;40&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;warning&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;red&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;font-weight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;bold&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;footer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;background-color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;gray&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You have three &lt;dfn&gt;selectors&lt;/dfn&gt; up there, &lt;code&gt;h1&lt;/code&gt;, &lt;code&gt;.warning&lt;/code&gt; and &lt;code&gt;#footer&lt;/code&gt;. A selector simply points to somewhere in your HTML document. It can be built in many ways and can be a combination of the following building blocks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Element&lt;/li&gt;
&lt;li&gt;Class&lt;/li&gt;
&lt;li&gt;Id&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&#39;m going to go through all three of them and explain what they do.&lt;/p&gt;
&lt;p&gt;An &lt;dfn&gt;element&lt;/dfn&gt; points at a HTML-tag somewhere on your page. In the example above we want to style the &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;-tag. Note that using an element like that affects all tags with that name, so using &lt;span class=&#34;margin-left: 100px; &#34;&gt;&lt;code&gt;p&lt;/code&gt;&lt;/span&gt; gives &lt;em&gt;all&lt;/em&gt; &lt;code&gt;p&lt;/code&gt;-tags a left-margin.&lt;/p&gt;
&lt;p&gt;Using a &lt;dfn&gt;class&lt;/dfn&gt; is just as simple. When writing &lt;code&gt;.your_class&lt;/code&gt; you style all tags with a class with the name &amp;quot;your_class&amp;quot;. In the example above we have &lt;code&gt;.warning&lt;/code&gt; which will style e.g. &lt;code&gt;&amp;lt;div class=&amp;quot;warning&amp;quot;&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;em class=&amp;quot;warning&amp;quot;&amp;gt;&lt;/code&gt;, that is, any element with the class warning. Classes are used when you want to style just a few of your tags in a way, perhaps you want some of your links red? Add a class to all those links.&lt;/p&gt;
&lt;p&gt;You need one more building block: the &lt;dfn&gt;id&lt;/dfn&gt;. This time you style an element with the attribute &amp;quot;id&amp;quot; set to the id you have chosen. Ids work exactly like classes except for one thing; you can only have one id with a certain name in each of your HTML documents. In the example above we style &lt;code&gt;&amp;lt;div id=&amp;quot;footer&amp;quot;&amp;gt;&lt;/code&gt;. If you look at the example it does make sense: a HTML document may contain several warnings but only one footer. Ids should be used when you want to style just one specific tag.&lt;/p&gt;
&lt;p&gt;Using those three building blocks will take you far but when you get to more advanced layouts you might want to combine the building blocks into more advanced selectors. Just to give you two examples of what you can do: &lt;code&gt;em.warning&lt;/code&gt; to style only those &lt;code&gt;&amp;lt;em&amp;gt;&lt;/code&gt;-tags with the class &lt;code&gt;.warning&lt;/code&gt; set. You can also use &lt;code&gt;#footer a&lt;/code&gt; to style only the links that are nested inside the tag with id &amp;quot;footer&amp;quot;. Pretty nice, isn&#39;t it?&lt;/p&gt;
&lt;p&gt;I could go on forever about the advanced uses of selectors but this is a beginner tutorial so I won&#39;t. If you want all the finer details, go have a look at the excellent &lt;a href=&#34;http://css.maxdesign.com.au/selectutorial/&#34;&gt;Maxdesigns Selectutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let&#39;s go on explaining the code above. Each of the selectors has a set of &lt;dfn&gt;declarations&lt;/dfn&gt; tied to them. Each declaration has a &lt;dfn&gt;property&lt;/dfn&gt;, describing what we want to change and a &lt;dfn&gt;value&lt;/dfn&gt;, what we should change it to. Too many terms there? Are you still with me? Let me explain with an example: &lt;span class=&#34;color: Blue; font-size: 3em; &#34;&gt;&lt;code&gt;a&lt;/code&gt;&lt;/span&gt;. You have the &lt;dfn&gt;selector&lt;/dfn&gt; &lt;code&gt;a&lt;/code&gt; there, so all links in your document will be styled. We have two &lt;dfn&gt;declarations&lt;/dfn&gt;: &lt;code&gt;color: Blue&lt;/code&gt; and &lt;code&gt;font-size: 3em;&lt;/code&gt;. Lastly each declaration consists of two parts: the &lt;dfn&gt;property&lt;/dfn&gt; &lt;code&gt;color&lt;/code&gt; and the &lt;dfn&gt;value&lt;/dfn&gt; &lt;code&gt;Blue&lt;/code&gt;. Phew! Well done for making it this far. The terms above are good to know since it gives you a way to talk about your CSS. If you join a CSS-channel asking for help with your code and they tell you &amp;quot;You have an error in your a-selector in the second declaration&amp;quot; you know exactly where! Right? :)&lt;/p&gt;
&lt;p&gt;Now you will probably ask what properties there are. You have seen &lt;code&gt;font-size&lt;/code&gt; and &lt;code&gt;color&lt;/code&gt; but what else is there? The answer is that there are a &lt;em&gt;LOT&lt;/em&gt; of things you can style and play with. Additionally (close to) all tags are equal in CSS, so you can set e.g. borders and colors of &lt;em&gt;any&lt;/em&gt; element just like you could with a table if you used only HTML. Starting to see the possibilities?&lt;/p&gt;
&lt;p&gt;I won&#39;t go through all the properties here, it would just bore you to death. Instead I&#39;ll point you to another great resource: &lt;a href=&#34;http://www.w3schools.com/css/&#34;&gt;w3schools section about CSS&lt;/a&gt;. Just select one of the menu options to the left to start exploring what CSS can do.&lt;/p&gt;
&lt;p&gt;But don&#39;t you leave me all alone here, there is more to learn! Next we will talk about good and bad coding and there will be a lot of colorful examples for you. Sounds good?&lt;/p&gt;
&lt;h2 id=&#34;separation&#34;&gt;CSS is all about separation&lt;a href=&#34;#separation&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the least followed parts of CSS is the very idea behind it, the idea of separation of content and design. The idea here is that all sites contain two major parts, the content: all your articles, text and photos and the design: rounded corners, colors and effects. Usually those two are made in different parts of a webpage&#39;s lifetime. The design is determined at the beginning and then you start filling it with content and keep the design fixed. So if you just want to add content to your site you don&#39;t want to be forced to mess around with the design, do you? The same thing is true the other way around, if you decide on a redesign, why should you have to mess around with the content, making sure it fits in the new layout?&lt;/p&gt;
&lt;p&gt;In CSS you just add the nifty &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt;-tag I&#39;ve told you about to the head of your HTML document and you have created a link to your design. In the HTML document you put content only, and that link of yours makes sure it looks right. You can also use the exact same link on many of your pages, giving them all of them the same design. You want to add content? Just write a plain HTML document and think about marking things up like &amp;quot;header&amp;quot; instead of &amp;quot;big blue header&amp;quot; and use CSS to make &lt;em&gt;all&lt;/em&gt; headers look the way you want!&lt;/p&gt;
&lt;p&gt;This is a different way of thinking about webpages, and it&#39;s something that took a while for me to understand. To help you I have written some examples of good and bad coding. What&#39;s wrong with this?&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;font&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;size&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;3&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Welcome to my page&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;font&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Comment: The font-tag is design and design shouldn&#39;t be in the HTML document. All design should be in the CSS-file! Instead do this:&lt;/p&gt;
&lt;p&gt;In the HTML:&lt;/p&gt;
&lt;div class=&#34;correct&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Welcome to my page&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In the CSS:&lt;/p&gt;
&lt;div class=&#34;correct&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;font-size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;One more example:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;An error occurred&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;b&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Comment: This looks right doesn&#39;t it? But if you look up what &lt;code&gt;&amp;lt;b&amp;gt;&lt;/code&gt; stands for you quickly find &lt;em&gt;bold&lt;/em&gt;. But bold is certainly design, so it still doesn&#39;t belong in the HTML document. A better choice is &lt;code&gt;&amp;lt;em&amp;gt;&lt;/code&gt; that stands for &lt;em&gt;emphasis&lt;/em&gt; or simply &amp;quot;this piece of text is important&amp;quot;. So instead of saying &amp;quot;this text looks like this&amp;quot; you are saying &amp;quot;this text is important&amp;quot; and you let the looks be decided by the CSS. Seems like a minor change, but it illustrates how to select your tags. Use this instead:&lt;/p&gt;
&lt;p&gt;In the HTML:&lt;/p&gt;
&lt;div class=&#34;correct&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;An error occured&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In the CSS:&lt;/p&gt;
&lt;div class=&#34;correct&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;font-weight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;bold&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Red&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;One last example:&lt;/p&gt;
&lt;div class=&#34;incorrect&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;first link&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;second link&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  ...
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Comment: Lots of people format their navigation menu like the above example. But is a navigation menu really a table? If you look up the definition of a table you see that it&#39;s made for tabular data, the same kind of data you would put in an Excel sheet. The example has only one column of data, and no headers… Some people state that they use tables because that means that they can get borders and a background color on their navigation, but that&#39;s exactly what your CSS file is for (not the HTML document). So what should we do? Look deep in the list of &lt;a href=&#34;http://www.w3schools.com/html/&#34;&gt;HTML elements at w3schools&lt;/a&gt; and you&#39;ll find something called an unordered list, &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;. Have a look at this:&lt;/p&gt;
&lt;p&gt;In the HTML:&lt;/p&gt;
&lt;div class=&#34;correct&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;first link&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;second link&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  ...
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In the CSS:&lt;/p&gt;
&lt;div class=&#34;correct&#34;&gt;&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;border&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;solid&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This is probably a different way of thinking about HTML than you&#39;re used to but trust me, when you&#39;ve worked with it for a while you&#39;ll see the power of it. Not only does this way of coding give you a more logical structure, there is also proof that this improves your ranking in search engines and makes it easier for accessibility devices to read your site. This way of designing is great.&lt;/p&gt;
&lt;p&gt;Next we will build a simple HTML template to use as a start when building a new page. Like to see it?&lt;/p&gt;
&lt;h2 id=&#34;building-a-standards-based-html-template&#34;&gt;Building a standards based HTML template&lt;a href=&#34;#building-a-standards-based-html-template&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We have talked a lot about the theory behind CSS and HTML working together to form a site with good structure that is separated from the design. But the first parts of building pages are always the same, you type&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;html&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;header&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
       &lt;span class=&#34;cm&#34;&gt;&amp;lt;!-- Header here! --&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;navigation&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;cm&#34;&gt;&amp;lt;!-- Navigaiton here! --&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;content&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;cm&#34;&gt;&amp;lt;!-- Content here --&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;html&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Ok, there might be some new stuff there so let&#39;s go through the lines one by one. First we state this document&#39;s doctype: what language we use. You might have heard of XHTML, another similar web language, but for a first page we don&#39;t need the features that gives us access to, keep it simple, just go with HTML. Also, the &lt;code&gt;&amp;lt;!doctype html&amp;gt;&lt;/code&gt; above sets the document to use &lt;em&gt;Strict&lt;/em&gt; HTML. To understand that you need to know that there are two kinds of rendering in a browser. One that follows the standards set up by the &lt;a href=&#34;http://www.w3c.org&#34;&gt;W3C&lt;/a&gt;, &lt;dfn&gt;&amp;quot;standards mode&amp;quot;&lt;/dfn&gt;, and one for older pages, called &lt;dfn&gt;&amp;quot;quirks mode&amp;quot;&lt;/dfn&gt;. Standards mode is what we want to use. It makes the pages render (almost) the same in modern browsers and it frees us from being dependent on a specific browser, we&#39;ll just follow the standard. Quirks mode is something of a bug mode. It&#39;s there to keep old pages looking the same as they did before browsers started trying to follow the standards and is therefore intentionally filled with strange bugs. A browser determines which rendering mode to use based on what doctype we use, so make sure you use the right one!&lt;/p&gt;
&lt;p&gt;Ok. That&#39;s a lot of explaining for a single line of code, I&#39;ll be swifter now, next line. You have probably written &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; before in the beginning of your documents. My line is almost like that except that I have added &lt;code&gt;lang=&amp;quot;en&amp;quot;&lt;/code&gt; there. That line tells the browser which language we will use. Why does it matter what language we use? you ask… Well, there is assistive technology that read webpages to people out loud called screen readers. Those &lt;em&gt;have to&lt;/em&gt; know what language it is to be able to pronounce the words. It&#39;s so easy for you to add those few characters so why not do it? If you don&#39;t plan on making an English page you can find your own language code by visiting &lt;a href=&#34;http://www.w3.org/WAI/ER/IG/ert/iso639.htm#2letter&#34;&gt;WAIs Language Codes&lt;/a&gt; and check out the two-letter names there (&lt;em&gt;Note:&lt;/em&gt; language codes are in lowercase).&lt;/p&gt;
&lt;p&gt;Next we have the &lt;em&gt;head&lt;/em&gt; of the document. The head contains a some of meta-information about the page, like character encoding, title and what stylesheet (CSS file) to use. The charset there is the trickiest one so let&#39;s take that first. There are a lot of different letters in a language. When computers where first constructed the engineers only thought about the American/English language, they didn&#39;t even think about the swedish letters å, ä, ö or the deutsch umlaut ü or what about the &amp;amp;-sign? There are a lot of characters and at first there was no general consensus on how to handle them. Then someone came up with the smart idea of grouping them into &lt;em&gt;sets&lt;/em&gt;, groups of characters that are used in certain parts of the world. So, what the meta-tag does is simply to state: &amp;quot;This person wants to input western characters (latin-1 characters)&amp;quot;, and this tells the browser what character set to use. A more genaral approach is to use the utf-8 character set but that quickly gets tricky. Finally we have a text/html there that simply tells the server to send the document as a HTML, not like an image or something like that. The &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; you should be familiar with, if not, google it :)&lt;/p&gt;
&lt;p&gt;That was a lot of info on just a few lines of code, I hope I didn&#39;t give the impression that this stuff is hard, because it&#39;s not. To use the stuff above you just copy and paste it and start filling it with content.&lt;/p&gt;
&lt;p&gt;The body of the document consists of a bunch of divisions, let&#39;s add some content to them:&lt;/p&gt;
&lt;div id=&#34;semantics&#34;&gt;&lt;/div&gt;

&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;...
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;header&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;The name of this page&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;navigation&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Navigation&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;first.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;First&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;second.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Second&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;third.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Third&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;content&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Content&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  Some sample content, add your own here
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;footer&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  This page is written by [Your name] and builds on a &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;http://friendlybit.com&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Friendlybit template&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;.
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
...
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;What have we done here? First you should note that a quick overview of the document tells you quite much about the content. You can easily see that some stuff are headers (h1, h2) and some are just a list of links (ul, li, a). Let&#39;s go through the code quickly:&lt;/p&gt;
&lt;p&gt;First we have a header. A header is something that&#39;s most often a big image and some text. Some pages don&#39;t have the header in the HTML at all, they just link to an image and have the text in that image. Problem with that is that neither search engines nor screen readers can get the title text. With the title text being the most important piece of description a visitor has to what page they have come to, you do have a problem. So trust me, keep that text there.&lt;/p&gt;
&lt;p&gt;Next up we have the navigation. Navigation should almost always be marked up as an unordered list of links. I&#39;ve seen the strangest variants of this with tables, nested tables, ``-tags after each line and so on but the only content there is a list of links, why make it something it isn&#39;t? Using a list doesn&#39;t mean it will have to look a certain way, remember that all design is handled in the CSS later on, this is just HTML we are dealing with here. Note: you can easily remove the bullet marks with &lt;code&gt;list-style: none;&lt;/code&gt;, that&#39;s not a reason to use some other HTML.&lt;/p&gt;
&lt;p&gt;The most important part of your HTML document is the content. This is the reason people will visit your page and this is where you should put most of your effort. Mark your headers with appropriate header-tags and make sure they look different from the ordinary text, this makes it easier quickly get a grip of what you&#39;re are trying to say. Use paragraph tags around your paragraphs to make is easier to style your text. The CSS &lt;code&gt;text-indent: 2em;&lt;/code&gt; adds some space before only the first word in each paragraph, just to name one simple thing you can do with CSS when you&#39;ve used good markup.&lt;/p&gt;
&lt;p&gt;Lastly, it could be a good idea to add a footer to your page. Make sure you have some kind of contact information here or somewhere else on your site, who knows what people will want to ask you? If you want to help me you could add a link to this site somewhere on your site too. If you do, thanks alot!&lt;/p&gt;
&lt;p&gt;On the next (and last) page of this short beginners guide we will wrap everything up and add some sample CSS to the mix. All is free for you to copy and use on your page. Ready?&lt;/p&gt;
&lt;h2 id=&#34;full-html-template-and-sample-css&#34;&gt;Full HTML template and sample CSS&lt;a href=&#34;#full-html-template-and-sample-css&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Let&#39;s start by putting the two pieces of HTML I showed you together and combine it with some sample CSS: &lt;a href=&#34;/files/example1/&#34; data-no-instant&gt;Sample HTML + CSS&lt;/a&gt;. You can find all code that makes that page below. Feel free to copy the code below and experiment on your own.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;html&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;lang&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;en&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;header&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;The name of this page&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;navigation&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Navigation&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;first.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;First&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;second.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Second&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;third.html&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Third&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;li&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ul&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;content&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Content&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      Some sample content, add your own here
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;footer&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
      This page is written by [Your name] and builds on a &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;http://friendlybit.com&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Friendlybit template&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;.
    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;html&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You should be able to tell what each part of the HTML does by now. Let&#39;s instead have a look at some sample CSS for the structure we have above. If you want to experiment with this code you can copy it to a file named style.css (or any other filename you reference in the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt;-tag in the HTML) and place it in the same directory as the HTML document.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;background-color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Green&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;border&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;solid&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Black&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;padding&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;7&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;600&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h4&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h5&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h6&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;margin&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;navigation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;150&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;left&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;430&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;footer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;	&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;clear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;both&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Let&#39;s go through the six rules above. First we set the background-color of body, and body is the background of everything, so this will do the same as bgcolor did in HTML.&lt;/p&gt;
&lt;p&gt;Next we set some styles on all divisions on the page. We have four of them and with this single rule we affect them all. First we set a black border to be 3 pixels wide (note that there is no space between number and unit in CSS). We then set a padding (the space between the border and content) to be 7 pixels and lastly we set the width of all divs to 600 pixels (note that margins, borders and padding are not included in the width).&lt;/p&gt;
&lt;p&gt;The third rule selects all headers on the page and removes the margins (the space between the border and other nearby elements) from them. The commas are used between the elements to apply the same CSS to all of them.&lt;/p&gt;
&lt;p&gt;Next we have some specific rules for three of the divisions. We position the navigation to the left of the content. This is done by using &lt;dfn&gt;floats&lt;/dfn&gt;, a way to put things side by side. If you have used the align-attribute on images in HTML you will know how floats work, they move the element as far to the left as possible and then let the next element follow right next to it. If you want to put something below a float you need to &lt;dfn&gt;clear&lt;/dfn&gt; it. Clearing moves the element down until it&#39;s below any floats, exactly where we want the footer. So both navigation and content are floated and given a width to match the 600 pixels wide header, and the footer is cleared.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I have added some &lt;a href=&#34;/css/simple-css-templates/&#34;&gt;simple layouts&lt;/a&gt; for you to look at, and a list of &lt;a href=&#34;/css/web-development-pack/&#34;&gt;tools I use when developing&lt;/a&gt;. Hope they help all of you out there that learn by examples.&lt;/p&gt;
&lt;p&gt;Now it&#39;s your turn, you will learn CSS by using it and trying out how things work. So go ahead and play with the sample above. Thanks for reading, and good luck!&lt;/p&gt;
&lt;p&gt;Any ideas of how this guide could be improved? Just leave a comment to the right.&lt;/p&gt;

            </content>
        </entry>
    
</feed>