HTML – Bad Tags

No Comment.

HTML – Bad Tags

Date here Author here

This page looks at some of the HTML tags of fairytale worlds and prehistoric times. Bad, nasty, downright ugly little things that belong to outdated HTML standards, random proprietary nonsense that only half-work in one sub-version of one browser or tags that have simply been superseded by newer tags.

Some have suggested that although the approach of HTML Dog to teach standards-based HTML and CSS without making a song and dance about the standards is perhaps a good one, but by doing so, users (beginners in particular) may come across different approaches and bad practices elsewhere without knowing that there is anything wrong with them. So here’s HTML Dog’s answer: A guide to what not to use.

HTML has attempted to move away from the presentational and towards the meaningful, leading to a philosophy of separating content and meaning (HTML) from presentation (CSS). This general approach tends to lead to much leaner web pages, because a single set of presentational instructions (in an external CSS file) can be applied to many pages. This also makes the site much more manageable because global changes can be made from a single source.

Some of the ‘bad tags’ are simply presentational tags (such as small) that could be replaced with something meaningful or simply with CSS. Others may not only be presentational, but unnecessarily bulky (such as the font tag) or hideously detrimental to usability (such as blink).

These are some of the most common tags you might come across that have better alternatives:

  • b could be used to make an element bold. Using strong (meaning strong emphasis) instead adds meaning, or to just add boldness, font-weight: bold in CSS does the job.
  • i could be used to italicise an element. Using em (meaning emphasis) instead also adds meaning or font-style: italic can be used to just add the presentation.
  • big could be used to make big text. Using headings instead (h1, h2 etc, when text genuinely is a heading) adds meaning, or simply using the font-size property in CSS gives more control.
  • small could be used to make small text. CSS (font-size) once more gives more control.
  • hr could be used to show a horizontal rule. It is unusual to use hr in a CSS designed page anyway; properties such as border-top and border-bottom or even just plain old images do the job much better.

Those tags mentioned above are all compliant with the latest HTML standards but they don’t apply any meaning to content, which all good tags should. They could be more useful but they aren’t particularly harmful, and might easily be mistaken for innocent butter-wouldn’t-melt-in-their-mouth nuggets of pure goodness when standing next to the following filthy tags.

  • u could be used to underline elements. It remains that underlined text is still associated by many with links. This is why this tag died a long time ago – you really don’t want to be underlining non-linking text.
  • center could be used to centre one element within another. The CSS property text-align allows values of not only center, but left, right and justify as well.
  • menu could be used to create a menu list. It does pretty much what ul does, but as an ‘unordered list’ is more general, ul stands tall over menu’s corpse.
  • layer is similar to a div element positioned with CSS. These only work in old versions of Netscape. So not very useful then.
  • blink or marquee. Just say “NO!” kids. They are supposed to do exactly as they say, but have very limited support and were surely only ever intended to be very, very sick jokes.
  • font, which could be used to define the font name, size and colour of an element has gained a deserved reputation of being the notoriously mischievous evil goblin lord of Tagworld. Old sites (even some new ones) have font tags splattered all over their pages like a plague of termites. Much of their proliferation has come about from web authoring software, placing font tags around every element that the web author applied colour or size to. Whereas a font tag needs to be applied to every occurrence of an element (say, every time you use a p element), with CSS you can apply properties to every occurrence of an element with just one single little line of code for your whole web site. Using this method, not only is the page weight substantially lighter than an equivalent font-tag infested page, but changes can be made more easily because all you need to do is change one line of CSS rather than every instance of a font tag. This also increases the likelihood of maintaining a consistent design across your site. font tags and the inappropriate use of tables are the two most common causes of unnecessarily bloated pages.


So you might think you’re using the good tags, but there are a few pesky parasitical attributes lurking about that might turn them sour.

  • name could be used to assign a name to an element, which is perfectly acceptable in form elements such as input, but elsewhere name’s job had been replaced by the id attribute.
  • text and bgcolor could be used to specify the base text colour and background colour of a page within the opening body tag. The CSS color and background-color properties can do this just as well when applied to the body selector.
  • background could be used within the body tag to specify a background image for a page. CSS manages background images much better with properties such as background-image.
  • link, alink, vlink could be used within the body tag to specify the colour of links (non-visited, active and visited). CSS baby – :link, :active and :visited all do the job.
  • align could be used to align the content of an element (such as <div align=”center”>Stuff</div>), but, like the center tag, the CSS text-align property is the new boss.
  • target could be used to open a link in various states, most commonly in a new window (such as <a href=”wherever.html” target=”_blank”>Help me</a>). Sounds nice, but you’re not doing your site any favours. Users don’t expect things (such as new windows) to appear as if by magic and the most commonly used navigational tool is the browsers ‘back’ button, which won’t work if you open a link in a new window. It’s invalid and it’s inaccessible.

Presentational attributes for tags such as width and height for images and cellpadding and cellspacing for tables remain due to the frequency that different values need to be applied different elements. They aren’t the perfect solution, but if you have a page with a large number of images or tables, you may have no other sensible choice than to use them.

The most baffling presentational attributes belong to the textarea tag where not only are the cols and rows attributes valid, they are required in the latest HTML standard.

Good tags, bad use

To get in to your house you might be able to get down on your knees and squeeze through that little doggy door but wait! There’s a big ol’ human door emblazoned with a device called a door handle! Wow! Look – the door’s, like, just the right size for a human to fit through.

The collection of HTML tags (the good ones) was designed for a specific reason and believe it or not (believe it), when you use them for the right reasons, you’ll get better results.

Web pages are much more accessible to users with disabilities when the HTML is semantic, as screen readers will often emphasize a list when it encounters a ul tag or a heading when it encounters an h1 or h2 tag for example.

The most misused HTML of all is tables. Tables are commonly used for layout, but they should only be used to display tabular data, as they were always only intended to. The non-table layout method isn’t some kind of Zen Buddhist quest for true geek enlightenment, there is a real practical benefit of not only dramatically reduced page weight, but also being easier to maintain or redesign.

Sometimes designers will use some of those tags and attributes mentioned here (particularly tables for layout) to achieve a transitional design – one that will support older browsers (in particular Netscape 4) as well as modern ones. Tables will indeed allow better presentational control over the CSS inept Netscape 4, but its users are miniscule in number and decreasing while those to whom table-layout would be a great disadvantage – mobile device users – grow in number. The advantages of table-free design mentioned above far outweigh the disadvantages and should result in pages that, although minimally styled to a minority, retain full functionality in all browsers.


Goldilocks thought it would be a really good idea to help herself to a bowl of porridge but then three large carnivorous mammals showed up and threw her out of a window. Frames are bowls of porridge that belong to bears. They might look nice, but it would be quite perilous to go anywhere near them.

Most web sites do not use frames and in general web users are used to a single document as a page.

But if, for some reason, you want to prevent users adding a specific page to their bookmarks or if you want to prevent them recommending a specific page via email or instant messaging or if you want to add a whole other level of complexity to users with disabilities using screen readers who will need to navigate between frames on top of navigating through a page or if you want to confuse the hell out of search engines, go ahead, use frames.

In general, frames do nothing but add complexity and subtract usability.

If you follow these rules of thumb, you shouldn’t go far wrong:

1) If the tag or attribute name even so much as whispers anything suggesting presentation, don’t use it. That’s CSS’s job. And CSS does the job better.

2) Use the tag to do what its name implies. Tables are for tabular data. Headings are for headings. Etcetera etcetera.

3) When you’ve got specific content, use the appropriate tags. Lists for lists, headings for headings yada yada yada.

Quotes about programming languages


Quotes about programming languages


What computer scientists, authors and programmers think of popular programming languages.All languages

Tony Hoare quote about programming languages

“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”

Tony (C.A.R.) Hoare.

Computing professor, implemented Algol 60, searcher at Microsoft Research.

Algol 60 (Then taken in C)

“I couldn’t resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.”

Tony (C.A.R.) Hoare.


“It is practically impossible to teach good programming style to students that [sic] have had prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.”

E. W. Dijkstra in “The Threats to Computing Science” .

Edsger Wybe Dijkstra contributed to the first Algol 60 compiler. Known for the Disjkstra algorithm and numerous contributions to computer science.


“A C program is like a fast dance on a newly waxed dance floor by people carrying razors.”

Waldi Ravens. Programmer.

“In My Egotistical Opinion, most people’s C programs should be indented six feet downward and covered with dirt.”

Blair P. Houghton. Programmer.

“Going from programming in Pascal to programming in C, is like learning to write in Morse code.”

J.P. Candusso. Programmer.

“One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.”

Robert Firth. Author of programming books.

“Writing in C or C++ is like running a chain saw with all the safety guards removed.”

Bob Gray. Author.

“It’s 5.50 a.m…. Do you know where your stack pointer is?”



“C makes it easy to shoot yourself in the foot.
In C++ it’s harder, but when you do, you blow off your whole leg.”

Bjarne Stroustrup. Creator of C++.

“The evolution of languages: FORTRAN is a non-typed language. C is a weakly typed language. Ada is a strongly typed language. C++ is a strongly hyped language.”

Ron Sercely. Programmer.

“I invented the term ‘Object-Oriented’, and I can tell you I did not have C++ in mind.”

Alan Kay. Creator of Smalltalk.

“The latest new features in C++ are designed to fix the previously new features in C++.”

David Jameson. Author.

“Fifty years of programming language research, and we end up with C++ ?”

Richard A. O’Keefe. Computer scientist.

“Ever spend a little time reading comp.lang.c++ ? That’s really the best place to learn about the number of C++ users looking for a better language.”

R. William Beckwith.

“C++ has its place in the history of programming languages. Just as Caligula has his place in the history of the Roman Empire.”

Robert Firth.

“Java is C++ without the guns, knives, and clubs.”

James Gosling, co-inventor of Java.

“C++ is an horrible language. Even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.”

Linus Torvalds, inventor of Linux.


“The use of COBOL cripples the mind; its teaching should therefore be regarded as a criminal offense.”

E.W. Dijkstra.


“FORTRAN is not a flower but a weed — it is hardy, occasionally blooms, and grows in every computer.”

Alan J. Perlis. Computer scientist and professor (Yale).

“FORTRAN, the infantile disorder, by now nearly 20 years old, is hopelessly inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use.”

E. W. Dijkstra.

“FORTRAN was the language of choice for the same reason that three-legged races are popular.”

Ken Thompson. Co-creator of B, Unix, Plan 9 and the Go programming language.


“If Java had true garbage collection, most programs would delete themselves upon execution.”

Robert Sewell. Programmer.


“Lisp isn’t a language, it’s a building material.”

Alan Kay.


“Perl is the only language that looks the same before and after RSA encryption.”

Keith Bostic. Programmer, created Sleepycat, contributed to free BSD unices.


“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals.”

Jon Ribbens. Programmer.

Bash and other shells

“It is easier to port a shell than a shell script.”

Larry Wall. Creator of Perl.

And finally…

“There are only two kinds of programming languages: those people always bitch about and those nobody uses.”

Bjarne Stroustrup.

Unfortunately, I believe he is right. However, there have always been two schools, one for clear and safe languages (Pascal, and then scripting languages) and the other for languages facilitating hacking but with random results.

Trends and future directions in programming languages

The free lunch is over unless you write it differently.

1. Declarative programming and DSL

more what, less how,

1. Functional programming


1. Dynamic and Static language

1. Meta-programming

1. Concurrency


Domain Specific Language









Source: http://channel9.msdn.com/Blogs/adebruyn/TechDays-2010-Developer-Keynote-by-Anders-Hejlsberg

By: Anthony de Bruyn