Killersites.com - Web Design Resources

View Cart

Archive for the ‘HTML’ Category

Is HTML a scripting language?

Thursday, August 24th, 2006

I’ve seen this confusion come up from time to time - is HTML a scripting language?

Short answer: no.

Yes a nerd detail, but nonetheless, this is something that should be made clear.

THE DETAILS:

HTML is actually a markup language and not a scripting language.

Scripting implies decision making capabilities (the code can actually evaluate and take an action based on what it finds) - PHP, PERL, Ruby, Javascript are examples of scripting languages.

Markup languages create structure for a document … they only describe data. For example:

  • HTML
  • XHTML
  • XML

… but you knew that already.

[;)]

Stefan Mischook

Book Review: Web Design in a Nutshell - 3rd edition

Wednesday, August 2nd, 2006

This book should probably be on any web designers/developers desk.

Web design has changed drastically since this book’s first edition came out … and thankfully Web Design In A Nutshell has been updated accordingly.

As with all of Oreilly’s ‘Nutshell’ books, Web Design In A Nutshell covers each topic in a concise and yet complete manner making it both a great learning title (for people with some web design skills,) and a great reference.

Some of the topics covered:

  • CSS - basics, page layout methods, hacks, tricks etc
  • HTML, XML and XHTML
  • Accessibility
  • Web graphics

… and so much more.

Besides the core coverage of the material itself, this book is also packed with great references to web sites and other good books on web design.

Get the book.

Three reasons you should learn to hand code your web pages.

Wednesday, January 25th, 2006

In this podcast, I discuss the 3 reasons why learning to hand code your web pages makes sense … and dollars too! 

Podcast running time: 7:30

Download MP3 link: 3 Reasons to hand code

Thanks,

Stefan Mischook

Tag Soup: why using XHTML does not make sense.

Monday, December 5th, 2005

Using XHTML instead of HTML to build web pages is one of today’s web design fads. Like other silly practices promoted by the web standards zealots (using CSS hacks for example,) this is something that will create extra work for no real PRACTICAL advantage and may even create problems for you!

People have been sold on XHTML with the typical web standards arguments that have a tendency to ignore the ‘reality in the field’. In this article I explain why you should stick to using good old HTML for the time being.

First, what is the reality today?

  1. Internet Explorer 6 and 7 (among other browsers,) will NOT render XHTML.
  2. If you use XHTML, DOM scripting and AJAX will be much more trouble.
  3. The supposed advantage (if ever realized,) are really minor at best.

Let’s consider these points:

BROWSERS AND XHTML

  1. When you serve XHTML to most browsers, your crazy-cool XHTML will be treated like ordinary HTML, thus loosing all the supposed advantages of XHTML.
  2. If you want browsers to treat XHTML as XHTML, you need to set the MIME type to: application/xhtm+xml. The problem is that IE6, IE7 and other browsers, will give you the ‘download this document’ pop-up box instead of displaying the page in the browser window.
  3. If you’re really intent on using XHTML, you could use scripting to sniff out browsers and change the MIME type accordingly, but this would lead to script-branching - if you wanted to use any DOM / AJAX scripts … more headaches.

HOW DOM SCRIPTING IS MADE HARDER WITH XHTML

The issue that stands out the most for me (and is enough for me to not use XHTML,) is that you can’t use ‘document.createElement’ to create new elements with the DOM if you are using XHTML.

In case you don’t know, ‘document.createElement’ is one of the key methods of DOM programming and by extension AJAX.

-

This topic was recenty discused on the message board:

XHTML OR HTML

Stefan Mischook

What are CSS tables?

Saturday, November 19th, 2005

NOTE: This article is theoretical - CSS tables are not supported by the browsers yet, and cannot be used. I wrote this article to make a few points and to expose people to lessons learned in software development: that grids are an excellent way to layout user interfaces.

Stefan

-

Grid layout patterns are commonly used in creating software interfaces - in web design we call them ‘tables’.

But today HTML table based layout is generally frowned upon because:

  1. HTML tables render/display content in a fixed format/style that might not display properly in certain types of browsers.
  2. Tables semantic meaning is thought to represent tabular data - like a spread sheet. Thus using them for page level layout is just wrong … gosh darn it!

There are other reasons why some web designers will say HTML tables suck:

  • HTML tables cause code to be bloated and thus pages will take longer to download.
  • HTML tables will make your website less search engine friendly.
  • HTML tables will make your websites less accessible.

The last 3 points are myths and should be ignored - I covered that in other articles.

That being said, the first point about tables imposing a fixed format/style (where formatting and structure are intertwined - that’s bad,) is very real and very important. It is so important in fact, that I will do what I can to avoid table based layout despite the extra work and problems this can cause.

It’s a terrible shame

Using a grid/table to create UI’s is intuitive, too bad that table based layouts are so controversial … but there maybe is a light at the end of the web UI tunnel: CSS table layouts.

What the heck are CSS tables?

From the W3C:

‘The CSS table model is based on the HTML 4.0 table model, in which the structure of a table closely parallels the visual layout of the table.’

Now in English:

CSS tables are just a set of CSS attributes that you can apply to (probably) div tags to create a ‘table’. Check out this code snippet and things should clear up:

<div class=”table”>
<div class=”row”>
<div class=”cell”>
<p>Yallow!</p>
</div>
</div>
</div>

This is an official W3C specification, I’m not inventing anything here!

So why invent CSS tables when we have HTML tables?

The answer is simple young grasshoppers: to gain the advantage of table based layout while avoiding the problems (mentioned above) with HTML tables:

  1. HTML tables format content in a fixed structure that might not render properly in certain browsers.
  2. Tables semantic meaning is thought to represent tabular data - like a spread sheet. Thus using them for page level layout is just wrong.

CSS tables can’t be used in any browser today, so why mention them?

I have two reasons why I wrote this article:

  1. To educate people of this long term possibility and maybe to start stirring things up - it would nice to have this web design tool.
  2. To make a point about grid based layouts: they have merit and should be considered.

Stefan Mischook

© 1996 - 2009 Killersites.com - All rights reserved
  • Hosting and domain name support:
  • (480) 624-2500

PayPal Customer Support: 1-888-221-1161

Killersites.com has been a PayPal Verified Merchant since 2001. We also accept payment via check or money order.

Please send payment to:

Killersites.com Inc. 334 Terrasse St-Denis #506 Montreal, Quebec Canada H2X 1E8

The more your learn, the more you earn!

Subscribe to our newsletter
Unsubscribe