Forum Moderators: open

Message Too Old, No Replies

Title Tag goes before or after Http-Equiv Meta Tag?

         

TravelSite

10:53 am on Aug 30, 2005 (gmt 0)

10+ Year Member



Pages on most of our sites follow the format:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title>Page Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en">
<meta name='Page Description'>
<meta name='keywords' content='Page Keywords'>
<link href='/stylesheet/standard.css' rel='stylesheet' type='text/css'>
</head>

Given that the http-equiv tags specify encoding and language I was wondering whether other webmasters place these two tags above the title - or if the title tag should always be at the top?

encyclo

12:49 pm on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The Content-Language meta tag is not really required as you are declaring the language with the
lang
attribute on the
html
element.

For the charset declaration, it really needs to be before any displayed content - and that includes the

title
element. However, you are saved by two things - firstly that you are using ISO-8859-1, which is the default encoding anyway if no charset is declared, and secondly that you are using English, and so are unlikely to be using characters outside of the basic US-ASCII charset, which is a subset of both ISO-8859-1 as well as UTF-8.

The ideal way of setting the charset is to send it as an HTTP header before the page is served, as this ensures that the browser knows the charset from the outset and does not need to redraw the page if the later charset meta declaration overrides the one assumed to be correct by the browser.

TravelSite

1:28 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



That's great thanks :) We use a few different languages - but the layout of meta tags etc is held in a php include file so changing things should be straightforward.

g1smd

2:00 pm on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would go for Charset before Title, as with the reverse I have had reports of seeing a corrupted title by several people using "Far-East" versions of browser and OS.