aboutsummaryrefslogtreecommitdiff
path: root/build/html-like-1999/index.html
diff options
context:
space:
mode:
authorbt <bt@btxx.org>2024-06-08 13:22:19 -0400
committerbt <bt@btxx.org>2024-06-08 13:22:19 -0400
commitdcfb172704f3afb68a30425029ec834be2883274 (patch)
tree02ac480745db802d7af03f3213a0c568322170e3 /build/html-like-1999/index.html
parente146f8a64c793c337999ce316b16ebe5fe6f2dab (diff)
More content porting, on-going markdown changes for lowdown support
Diffstat (limited to 'build/html-like-1999/index.html')
-rw-r--r--build/html-like-1999/index.html93
1 files changed, 52 insertions, 41 deletions
diff --git a/build/html-like-1999/index.html b/build/html-like-1999/index.html
index b24d2fd..a9202ea 100644
--- a/build/html-like-1999/index.html
+++ b/build/html-like-1999/index.html
@@ -1,64 +1,75 @@
<!doctype html>
-<html lang="en" id="top">
+<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:,">
<title>Write HTML Like It's 1999</title>
- <link href="https://bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
- <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style>
+ <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
+ <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" />
+<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style>
</head>
<nav>
- <a href="#menu">Menu &darr;</a>
+ <a href="#menu">Menu &darr;</a>
</nav>
<main>
-<h1>Write HTML Like It's 1999</h1>
+<h1 id="write-html-like-its-1999">Write HTML Like It&#8217;s 1999</h1>
+
<p>2019-06-06</p>
-<p>I am sure it's safe to say that most developers love to use the latest and greatest web tools available. Helpful resources such as preprocessors, template engines, syntax formatters - you name it - can all make a developer's life easier. Unfortunately, this sometimes comes at a cost: the HTML structure.</p>
-<p>This is why I try my best to write HTML as if I'm stuck with the constraints of the 90s (within reason). What does this mean exactly? It means that <code>tables</code> are coded with <code>table</code> elements. Navigations are coded with <code>nav</code> and ordered/unordered list-items. Form inputs are not set with <code>display: none</code> and replaced with custom containers. You know, <em>semantic</em> HTML.</p>
-<p>To be clear, I'm not advocating for creating projects that <em>look</em> like they belong in the 1990s. I would just prefer developers / designers be more conscious of their HTML <em>skeleton</em>.</p>
-<h2>Bad HTML practices</h2>
-<p>Let's do a very simple breakdown of some of the more common HTML no-nos:</p>
-<p><ul>
-<li>Using <code>span</code> or <code>div</code> elements for navigations or list components</li>
-<li>Implementing custom <code>div</code> layouts for forms while removing items like <code>select</code> or <code>radio</code></li>
-<li>Creating tables built out of custom <code>div</code> elements</li>
-<li>Over-nesting elements or making overly complex depth to simple components</li>
-<li>Content being heavily reliant on JavaScript "injection"</li>
-</ul></p>
-<h2>Good HTML practices</h2>
+
+<p>I am sure it&#8217;s safe to say that most developers love to use the latest and greatest web tools available. Helpful resources such as preprocessors, template engines, syntax formatters - you name it - can all make a developer&#8217;s life easier. Unfortunately, this sometimes comes at a cost: the HTML structure.</p>
+
+<p>This is why I try my best to write HTML as if I&#8217;m stuck with the constraints of the 90s (within reason). What does this mean exactly? It means that <code>tables</code> are coded with <code>table</code> elements. Navigations are coded with <code>nav</code> and ordered&#47;unordered list-items. Form inputs are not set with <code>display: none</code> and replaced with custom containers. You know, <em>semantic</em> HTML.</p>
+
+<p>To be clear, I&#8217;m not advocating for creating projects that <em>look</em> like they belong in the 1990s. I would just prefer developers &#47; designers be more conscious of their HTML <em>skeleton</em>.</p>
+
+<h2 id="bad-html-practices">Bad HTML practices</h2>
+
+<p>Let&#8217;s do a very simple breakdown of some of the more common HTML no-nos:</p>
+
+<h2 id="good-html-practices">Good HTML practices</h2>
+
<p>So what should you do in place of these bad HTML implementations?</p>
-<p><ul>
-<li>Use proper <code>nav</code>, <code>ul</code> and <code>ol</code> for navigations or list components</li>
-<li>Style form elements directly <a href="https://www.filamentgroup.com/lab/select-css.html">this is already supported in browsers</a></li>
-<li>Build tables using <code>table</code> element structure (mind-blowing, I know!)</li>
-<li>Keep element hierarchy as slim and top level as possible</li>
-<li>Avoid injecting <i>any</i> content via JavaScript (I understand this is difficult for certain apps, but try to minimize this as much as possible)</li>
-</ul></p>
-<h2>My basic "structure" test</h2>
-<p>I've found a pretty simple starting point for testing the <em>bones of a website</em> by using the following single line of CSS:</p>
+
+<h2 id="my-basic-structure-test">My basic &#8220;structure&#8221; test</h2>
+
+<p>I&#8217;ve found a pretty simple starting point for testing the <em>bones of a website</em> by using the following single line of CSS:</p>
+
<pre><code>* {
border: 2px dotted black;
}
</code></pre>
+
<p>This property simply outlines all elements on the current page in a dotted border. By placing a border on every HTML element you can instantly see how overly complex or <em>ugly</em> your structure might be under the hood.</p>
-<h2>"Thanks, Captain Obvious!"</h2>
-<p>I know, this stuff is pretty basic. The point of this post isn't to tell you (developers) something brand new or mind-blowing, but instead should inspire you to keep things simple.</p>
-<p>Don't forget that there is always someone new into the world of design and development. Hopefully this post steers others towards keeping HTML code semantic and clean.</p>
-<h2>Update to this article</h2>
-<p>Since this post received <a href="https://news.ycombinator.com/item?id=20133817">so much more attention</a> than I ever expected, I've decided to touch on a few small points brought up in the comments.</p>
+
+<h2 id="thanks-captain-obvious">&#8220;Thanks, Captain Obvious!&#8221;</h2>
+
+<p>I know, this stuff is pretty basic. The point of this post isn&#8217;t to tell you (developers) something brand new or mind-blowing, but instead should inspire you to keep things simple.</p>
+
+<p>Don&#8217;t forget that there is always someone new into the world of design and development. Hopefully this post steers others towards keeping HTML code semantic and clean.</p>
+
+<h2 id="update-to-this-article">Update to this article</h2>
+
+<p>Since this post received <a href="https://news.ycombinator.com/item?id=20133817">so much more attention</a> than I ever expected, I&#8217;ve decided to touch on a few small points brought up in the comments.</p>
+
<ol>
-<li><p><strong>What is the benefit of semantic HTML?</strong>
- - Accessibility. Programs like screen readers are built around the foundation of proper HTML hierarchy. I highly recommend testing all your projects with a screen reader - it will open your eyes to a lot of issues users with disabilities suffer through.</p>
-</li>
-<li><p><strong>Tables not being responsive</strong>
- - This simply isn't true. It is much more semantic to layout your tables as you would normally, then for mobile devices you can target specific inner elements and alter them with <code>flexbox</code> etc. (You can see responsive tables in action <a href="/responsive-tables">here</a>)</p>
-</li>
-<li><p><strong>Instead of the CSS one-liner, simply use Firefox debugger</strong>
- - Fair point. Firefox is great!</p>
-</li>
+<li><p><strong>What is the benefit of semantic HTML?</strong></p>
+
+<ul>
+<li>Accessibility. Programs like screen readers are built around the foundation of proper HTML hierarchy. I highly recommend testing all your projects with a screen reader - it will open your eyes to a lot of issues users with disabilities suffer through.</li>
+</ul></li>
+<li><p><strong>Tables not being responsive</strong></p>
+
+<ul>
+<li>This simply isn&#8217;t true. It is much more semantic to layout your tables as you would normally, then for mobile devices you can target specific inner elements and alter them with <code>flexbox</code> etc. (You can see responsive tables in action <a href="/responsive-tables">here</a>)</li>
+</ul></li>
+<li><p><strong>Instead of the CSS one-liner, simply use Firefox debugger</strong></p>
+
+<ul>
+<li>Fair point. Firefox is great!</li>
+</ul></li>
</ol>
<footer role="contentinfo">
<h2>Menu Navigation</h2>