Camen Design Forum

No <head> tag in html

append delete NickPfen

@Kroc
Reading the html source page from your website and I've noticed that you don't use <head> tags after your doc type declarations.
a. Why did you do this?
b. Do we need <head> tags?
c. Can this be done without php and just plain old css and html?

Peace,
- Nick

Reply RSS

Replies

append delete #1. Kroc

a. It’s cleaner

b. No. They have been optional (including `<html>` & `<body>` since HTML4); except IE won’t work without a `<body>` tag. You can just stick one inside the IE-only HTML5-shiv section to keep things tidy and still support IE

c. Yes. PHP has nothing to do with this fact

Kind regards,
Kroc.

append delete #2. NickPfen

Thanks for your response. Question: if you don't use body tags in your html and you don't support IE, why do you declare the body tag in css? Is it needed?

Peace,
- Nick

append delete #3. Kroc

The body tag is implied. If it’s missing in the HTML, it still exists in the CSS; see How to Centre and Layout Pages Without a Wrapper: http://camendesign.com/code/developpeurs_sans_frontieres for more details.

append delete #4. NickPfen

@ Kroc
Do you have an example of what your website, specifically your header, would like in a lo-fi browser?

append delete #5. Kroc

Could you rephrase that a little better? I don’t fully understand what you are asking. Camen Design doesn't cater to older browsers at all. It will simply break in unpredictable and unknown ways. The text should essentially be there, but I don’t know what it looks like.

append delete #6. NickPfen

In reading your CSS, you have a "lo-fi" section for all browsers and a "Hi-fi" section, and then (I think?), CSS for "All." I guess I'm confused on why you split your CSS up that way into sections? I thought you did that to cater to older browsers, but your post above says you don't. Can you explain? Or am I still not making sense?

append delete #7. Kroc

Oh right, that!

v3 of Camen Design was released around about the launch of Firefox 3.5 (and fully took use of it), this meant that there was still a majority of users on Firefox 3.0 initially

Because of that, and the addition of CSS3 media queries in Firefox 3.5, I decided to layer CSS support in by creating a lo-fi theme first (Firefox 3.0 / no CSS3 media queries), and then using CSS3 media queries to adapt that to better browsers / printer / mobile &c.

So the "all" section is the shared layout of the page, the "lo-fi" section is the theme for Firefox 3.0 and the "hi-fi / desktop" section is the theme for Firefox 3.5+

It’s very complicated, but then I was using CSS3 media queries on a site the day they became available to the majority of Firefox users. :)

If you want to see what this "hidden" lo-fi skin looks like (it's quite beautiful in it's own right, and fully supported across all the content), just get yourself a copy of either Firefox 3.0 or Camino 2.0.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, theraje, Martijn