<?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).aspx&#34;&gt;thorough documentation (pun intended)&lt;/a&gt;. 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>
    
</feed>