Notes on web development, self-hosting, and troubleshooting.
An RSS feed lets a reader check a site for new entries without opening its homepage. A small feed can start with just a title, a site link, a description, and one item.
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>My Web Notes</title>
<link>https://example.com/</link>
<description>Notes about building websites</description>
<item>
<title>A new … Continue reading →
Before Flexbox and Grid, a common way to position a sidebar was to float it and give the article room beside it. Try this with an element named menu followed by an element named article.
#menu {
float: left;
width: 10em;
}
#article {
margin-left: 11em;
}
#footer {
clear: … Continue reading →
Once a site has more than a few entries, copying the same layout into every page stops being practical. A classic WordPress theme uses templates to place the content inside a common design. The idea is easiest to see by following one page through its templates.
On a local test … Continue reading →
WordPress 1.5 introduced Pages alongside the chronological blog. That gave a small site two useful places to put things. A weekly update could go in a post, while an About page could have an address readers could return to whenever they needed it.
You can try the distinction on a … Continue reading →
A browser will often display a page even when some of its markup is malformed. That makes visual testing a poor way to tell whether the source is sound. An HTML validator gives you a second check.
Try it with a small HTML 4.01 page. Put an image on the … Continue reading →
Written retrospectively for the 2004 archive.
I like the idea of saving a copy of a site before changing its design. A screenshot tells me what it looked like, but it leaves out the experience of clicking through it. The HTML and images let me reopen the old pages and … Continue reading →
Written retrospectively for the 2004 archive.
PHP 5 arrived in July 2004 with a revised object model. To see one reason to use a class, try keeping the parts of a page title together in a small object. The example can run on a modern local PHP installation:
<?php
class … Continue reading →
Written retrospectively for the 2004 archive.
Before adding a photo to a page, open it at the size you expect the reader to see. A large original can look fine when the browser scales it down, while the visitor still has to download the whole file.
Make a resized copy, … Continue reading →
Written retrospectively for the 2004 archive.
Make a homepage, an About page, and a Links page. Give each the same three navigation links in the same order. A reader should be able to move between the pages without having to learn a new menu each time.
Now add a short … Continue reading →
Written retrospectively for the 2003 archive.
One of the things I like about early personal sites is how much a links page could tell you about the person behind it. A handful of useful links with a note beside each one made a page worth bookmarking.
To recreate one, make … Continue reading →