|HTML & CSS
Tips and Tricks
Note: these ideas are intended for those who write their own code and are interested in some useful methods and shortcuts for handling some of the more mundane issues of
production. If you rely upon the output of a WYSIWYG editor or
(ugh) wordprocessor, then you might not even see your code and there
might be nothing here for you.
I am not expecting to impress anyone who manages one of the top 1,000 websites, or perhaps even the top 100,000 websites; but those with less experience or expertise might find something of interest here. In any case, I guarantee that you will encounter ideas not published elsewhere.
That having been said, be aware that some of my ideas are admittedly unorthodox. Certain others might consider them downright heretical and would brand me as a renegade. Fortunately, that would be music to my maverick ears.
Mind you, I'm not trying to overthrow the Establishment here; but
a generally minimalist approach to
web-page markup can
improve one's life immensely. A few gimmicks and shortcuts,
plus the requisite mindset, can reduce your markup by hundreds or even
thousands of characters per page. It doesn't matter whether a
browser can read millions of characters per second; you
cannot. Oodles of time can be saved by keeping it simple,
and the results can be more editable and aesthetically pleasing as well.
Here is some sage advice from an unnamed blogger: "If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain."
Be aware that I am something of a throwback to the
of coding. You may already have noticed that the retro-style
pages at Ted's World are as uncomplicated and 'clean' as
I can make them. There are no animations, no interactive stuff,
discussed later. This does not mean that your own pages must
necessarily be as spartan as mine.
Rest assured that all of my suggestions are totally
HTML5-compliant and compatible with all modern browsers,
at least as far as the actual code is concerned. Some
methods might seem rather dated; but I might have been using them
since before newer ones became available. In any case, I'll
have nothing to do with deprecated constructs or anything else that
might cause a browser to hiccup. The primary goals are
efficiency and enjoyment. Having some fun, saving some time,
and eliminating redundant page-litter are the key issues.
For a tutorial on the latest HTML5
will need to look elsewhere. For some ideas on uncluttering
your pages (and perhaps your mind as well), read on.
Note: It is recommended that the following articles be viewed in sequential order, because any one of them might incorporate or discuss ideas introduced on prior pages.
|Semantics vs. Functionality||take a stand|
|The Master CSS File||if you don't have one, you certainly should|
|Fun with Tags||take charge and use them as you please|
|Line-Break Issues||start using the best tag of them all|
|Displaying Graphics-A||streamline the placement of single images|
|Displaying Graphics-B||handle multiple images with an alternative tag|
|Line Spacing||make easy adjustments as you type|
|Text Boxes||three pre-defined configurations|
|A Better Boldface||emphasize text without overdoing it|
|Entity References||english is easier to read|
|Page-Hit Counting||a short but useful script|
|A Cornucopia of Classes||Put Object-Oriented CSS to work|
The suggestions in these articles are just a drop in the bucket of what can be accomplished by caring more about one's results than about someone's rules. It's up to you. A real human would be happy to converse on any of these topics at: