RK* - rikkertkoppes.com

thoughts

[HTML] do you smurf what I smurf?

Tables are bad they say, use div's and CSS. So what is the result? Documents like this: (I've omitted trivial attributes)

<html>
<body>
  <div id="nav">
    <div class="nav-item">link1</div>
    <div class="nav-item">link2</div>
    <div class="nav-item">link3</div>
  </div>
  <div class="header1">Welcome to my page</div>
  <div class="para">
    <div class="subheader">sub header</div>
    <div class="paragraph">Ok this is <div class="strong">not</div> the way to do it</div>
    <div class="table">
      <div class="table-row">
        <div class="table-cell">yuk</div>
      </div>
    </div>
  </div>
</body>
</html>

Yes, I have seen this. Now have you ever read The Smurfs? They talk the same way as the example above (Southpark's Marklar is another example). Pages could look great when using this markup, but it's not what HTML is invented for. The purpose of HTML is to give meaning to your documents, by defining the function of each element. p for paragraphs and h1 for a header and so on. Also see [HTML] useful element constructions about useful constructions. Furthermore, do not use accessive class attributes, and do not use them with the intention to define style. See my writings about class, id and style.

So stop talking Smurf language, your fellow-Smurfs might understand what you're talking about, but Google for instance does not, blind people's screenreaders do not either. Just use HTML the way it is meant to be:

To read some thoughts on cases wher you should use div, see what div is about.

Further reading

Additional resources (top 15)

Below is a list of additional resources that might contain extra information about the subject at hand. These are all sites linking to this one (i.e. backtracking).

  1. Mastercode // [HTML] Div versus tabel (2594)
  2. [css] div onderaand div met overflow positioneren - Webdesign & Graphics - GoT - Powered b... [nl] (416)
  3. [CSS/HTML] Tot het eind van de pagina - Webdesign & Graphics - GoT - Powered by React [nl] (285)
  4. Techzine - Graphics & Webdesign - DIV's backgrounds centeren - List messages (247)
  5. [HTML] Discussie <div> .vs. <table> - Webdesign, Markup & Clientside Scripting - GoT - Pow... [nl] (228)
  6. [Anchors] Verkl*te Layout. - Webdesign & Graphics - GoT - Powered by React [nl] (153)
  7. CSS IE Probleem - Webdesign, Markup & Clientside Scripting - GoT - Powered by React [nl] (130)
  8. divs op 100% scalen in Firefox - Webdesign & Graphics - GoT - Powered by React [nl] (125)
  9. [HTML/CSS] Div order probleem - Webdesign, Markup & Clientside Scripting - GoT - Powered b... [nl] (111)
  10. Opdracht school, weergave FF anders dan IE - Webdesign & Graphics - GoT - Powered by React [nl] (104)
  11. [HTML] Tabellen in design niet goed... - Webdesign & Graphics - GoT - Powered by React [nl] (96)
  12. Tweakzone Forum - [check] design (95)
  13. [CSS/HTML/IE/Firefox]Achtergrondkleur van double border - Webdesign & Graphics - GoT - Pow... [nl] (90)
  14. WebmasterCity - [ The Ultimate Webmaster Resource ] (76)
  15. [html & css] lege regel onderaan - Webdesign, Markup & Clientside Scripting - GoT - Powere... [nl] (73)

comment

Kees (2005-01-12)

<h1>Welcome to my page</h1> is not a good header.

Matt (2005-01-13)

and it's not a good header because of... ?

Kees (2005-01-15)

It doesn't describe the contents of the page.

Martin (2005-01-18)

And if that title were on the first page of a site (by most people referred to as homepage) it would accually describe that first page as being a welcome page. But, that's just complaining about bad choice of words really. If the title were written as <div class="bold">Welcome to my page</div> do you think that would make it better? Now we no longer have anything that might be interpreted as a title, no matter if it were a bad choice of words or not.

Bas (2005-05-24)

Your <h1> should be the site (not page) title. Welcome might be a <h2> title.

Rikkert (2005-05-24)

All the headers together should form a nice table of contents for your site. A site's title is not part of the site's (table of) content(s), This information belongs in the <title> element. If you wish to repeat it in the document, do so in a seperate element (like <div id="flag">). <h1> should contain a header for (a part of) the content on that particular page. Also see my writings about <h1> on this (http://www.rikkertkoppes.com/thoughts/release-h1).

Sitethief (2006-06-12)

Anyway, you have one empty <legend> on this page and three empty <div>, go figure.

Inboxity (2007-10-05)

Yes I smurf what you smurf . I never knew that there were people who did it the first way "bad HTML"

phero (2007-12-28)

isnt <map> meant for images ?

HTML <map> tag Definition and Usage

Defines a client-side image-map. An image-map is an image with clickable regions.

Add comment
older articles

AdministrationAtom feed