Html page Doctype and Meta

S

shapper

Hello,

In this moment what is the most advisable Doctype to use in an HTML
page?
Where can I find some information about it?

And which meta tags should I always include in my page?
Should I include something else?

In this moment what I have is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<HTML>
<head>
<title>
Page Title
</title>
<meta name="description" content="My Page">
<meta name="keywords" content="keyword1, keyword2">
<meta name="author" content="(e-mail address removed)">
<meta name="copyright" content="Miguel Moura">
<meta http-equiv="content-language" content="EN-GB">
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
<meta http-equiv="content-style-type" content="text/css">

Thank You,
Miguel
 
B

Beauregard T. Shagnasty

shapper said:
In this moment what is the most advisable Doctype to use in an HTML
page?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
Where can I find some information about it?

Discussed every week in these various newsgroups. Transitional is for
legacy documents, and XHTML is pointless.
And which meta tags should I always include in my page?
Should I include something else?

In this moment what I have is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">

Move along to 4.01 Strict.

<head>
<title>
Page Title
</title>
<meta name="description" content="My Page">
<meta name="keywords" content="keyword1, keyword2">

A few keywords are ok, but most search engines ignore them, especially
if they do not also appear in the content.
<meta name="author" content="(e-mail address removed)">
<meta name="copyright" content="Miguel Moura">
<meta http-equiv="content-language" content="EN-GB">

I would place that in the said:
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">

Your server should send the proper content type. Not needed here.
<meta http-equiv="content-style-type" content="text/css">

Not needed, as far as I know. You do of course add the call to your
stylesheet here.
<style type="text/css" media="screen">@import "filename.css"; </style>

I would also add a notation for the favicon here, as browsers are always
looking for one, and you don't want a bunch of 404's in your logs.
Naturally, you need a 16x16px icon file in your root directory.

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
 
J

Jonathan N. Little

shapper said:
Hello,

In this moment what is the most advisable Doctype to use in an HTML
page?

Didn't bother to search this NG did you? Not like it hasn't been
discussed....

New work:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


Where can I find some information about it?

http://www.w3.org/
World Wide Web Consortium

http://www.w3.org/QA/2002/04/valid-dtd-list.html
W3C QA - Recommended list of DTDs you can use in your Web document
And which meta tags should I always include in my page?
Should I include something else?

In this moment what I have is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<HTML>
<head>
<title>
Page Title
</title>
<meta name="description" content="My Page">
<meta name="keywords" content="keyword1, keyword2">
<meta name="author" content="(e-mail address removed)">
<meta name="copyright" content="Miguel Moura">
<meta http-equiv="content-language" content="EN-GB">
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
<meta http-equiv="content-style-type" content="text/css">

None actually. The content type and character set are usually sent in
the HTTP header from the server, but if not or if it is a local file on
your hard drive you could use the one:

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">

"description" Maybe, some search engines still use it in their brief
description in the search results but if you make you page properly with
relevant content the engines will pull the description from your content.

"keywords" Waste of time, after all the abuse I don't think any search
engines still use them.

"author", "copyright", "whatever" Not need at all unless that do
something for "you"....
 
S

shapper

Didn't bother to search this NG did you? Not like it hasn't been
discussed....

New work:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


http://www.w3.org/
World Wide Web Consortium

http://www.w3.org/QA/2002/04/valid-dtd-list.html
W3C QA - Recommended list of DTDs you can use in your Web document








None actually. The content type and character set are usually sent in
the HTTP header from the server, but if not or if it is a local file on
your hard drive you could use the one:

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">

"description" Maybe, some search engines still use it in their brief
description in the search results but if you make you page properly with
relevant content the engines will pull the description from your content.

"keywords" Waste of time, after all the abuse I don't think any search
engines still use them.

"author", "copyright", "whatever" Not need at all unless that do
something for "you"....

Hi Jonathan,

In fact I did search the group.
But I couldn't find it what I was looking for: the link you sent me.

http://www.w3.org/QA/2002/04/valid-dtd-list.html

Thank You!
Miguel
 
M

Michael Fesser

..oO(Beauregard T. Shagnasty)
Not needed, as far as I know.

IMHO it is, but the spec is not entirely consistent about it:

http://www.w3.org/TR/html401/present/styles.html#h-14.2.1
I would also add a notation for the favicon here, as browsers are always
looking for one, and you don't want a bunch of 404's in your logs.
Naturally, you need a 16x16px icon file in your root directory.

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">

The first one should be enough.

Micha
 
M

Michael Fesser

..oO(Jonathan N. Little)
"description" Maybe, some search engines still use it in their brief
description in the search results but if you make you page properly with
relevant content the engines will pull the description from your content.

Some browsers also use it in their bookmarks.

Micha
 
J

Jukka K. Korpela

Scripsit Beauregard T. Shagnasty:
Your server should send the proper content type. Not needed here.

It may be of importance, if
a) the server does not actually send content type information and the
author cannot affect this (poor server settings)
b) a local copy of the document is accessed, so that there is no server
involved.
Not needed, as far as I know.

In principle, it is required if the page contains style="..."
attributes, since there is no other way to specify the style sheet
language used in those attributes.

In practice, it does not matter (even if you use style="..."
attributes), since browsers imply CSS as the style sheet language (and
I would also add a notation for the favicon here, as browsers are
always looking for one, and you don't want a bunch of 404's in your
logs. Naturally, you need a 16x16px icon file in your root directory.

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">

I think you have a misunderstanding here. These two tags (tailored to
suit different browsers' taste) are a way to make browsers use a
so-called favicon. Use them if you like the favicon idea and you have a
good icon. But whether browsers automatically request for a favicon file
is a different issue; I don't think it's common, and I cannot see how
this would be affected by those <link> tags at all. _If_ you think that
browsers automatically ask for a favicon, then you would simply have to
place an icon file at a URL that you expect them to use,
 
J

Jonathan N. Little

Michael said:
.oO(Jonathan N. Little)


Opera for example.

Not my Opera.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="description" content="Call me Joe!">
<title>Call me Sam!</title>
</head>
<body>
<p>Guess what gets put into your bookmark!</p>
</body>
</html>
 
M

Michael Fesser

..oO(Jonathan N. Little)
Not my Opera.

Hmm. Which version and which platform? IIRC it was supported even in
version 8 and older.

In the "Add Bookmark" dialog there's a button "Details", which shows
some more text fields. One of them is "Description", which can be pre-
filled with the meta description taken from the page.

Micha
 
J

Jonathan N. Little

Michael said:
.oO(Jonathan N. Little)


Hmm. Which version and which platform? IIRC it was supported even in
version 8 and older.

In the "Add Bookmark" dialog there's a button "Details", which shows
some more text fields. One of them is "Description", which can be pre-
filled with the meta description taken from the page.

9.23 WinXp Haven't updated because I only use for development testing
also have 8.51 & 7.54.

Now I see! If you use the menu to add the bookmark it pulls the
description else with drag-n drop it doesn't. One of things about Opera
that I don't like is that it seems lacking in drag-n drop functionality
compared to other browsers. When I am testing I will have several
browsers open and like to drag-n drop urls to each as I test, and damn
Opera won't accept a dropped url from another browser. I have to select
and copy and paste the url into Opera's address bar...
 
A

Adrienne Boswell

I think you have a misunderstanding here. These two tags (tailored to
suit different browsers' taste) are a way to make browsers use a
so-called favicon. Use them if you like the favicon idea and you have
a
good icon. But whether browsers automatically request for a favicon file
is a different issue; I don't think it's common, and I cannot see how
this would be affected by those <link> tags at all. _If_ you think that
browsers automatically ask for a favicon, then you would simply have to
place an icon file at a URL that you expect them to use,

Yup, IE will specifically request favicon.ico, and if the icon has a
different name, say mysite.ico, IE will still request favicon.ico and
there will be a 404 in the logs.
 
J

Jukka K. Korpela

Scripsit Adrienne Boswell:
Yup, IE will specifically request favicon.ico, and if the icon has a
different name, say mysite.ico, IE will still request favicon.ico and
there will be a 404 in the logs.

If that's the case, then the important thing is how you name your
favicon file; meta tags have nothing to do with this. On the other hand,
404 errors in the logs are not the end of the world as we know it;
they're just log entries, and perhaps servers should stop recording
them, since they're not useful.

But does IE really do that? It was a long time ago that I last peeked at
web server logs or studied this favicon thing, but I thought that
browsers at most requested for a _server_ specific favicon, at
http://www.example.com/favicon.ico , rather than the more sensible
approach of checking whether http://www.example.com/foobar/favicon.ico
exists when asked to access http://www.example.com/foobar/whatever.
 
M

Michael Fesser

..oO(Jonathan N. Little)
Now I see! If you use the menu to add the bookmark it pulls the
description else with drag-n drop it doesn't.

OK, this explains it.
With drag & drop it also doesn't work in Opera 9.50 beta. :(

Micha
 
A

Adrienne Boswell

Scripsit Adrienne Boswell:


If that's the case, then the important thing is how you name your
favicon file; meta tags have nothing to do with this. On the other hand,
404 errors in the logs are not the end of the world as we know it;
they're just log entries, and perhaps servers should stop recording
them, since they're not useful.

Agreed, it's not the end of the world, for me, but suits get excited
when they see 404 in a log. You also see requests for insecure types of
files that hackers can use. Then you have to explain to the suit that
it's a file commonly requested by hackers, etc.
But does IE really do that? It was a long time ago that I last peeked at
web server logs or studied this favicon thing, but I thought that
browsers at most requested for a _server_ specific favicon, at
http://www.example.com/favicon.ico , rather than the more sensible
approach of checking whether http://www.example.com/foobar/favicon.ico
exists when asked to access http://www.example.com/foobar/whatever.

I had an icon file called ethics.ico, which Firefox, Opera and IE7
happily displayed. Looking at the logs, I noticed the 404 for
favicon.ico, and the UA was IE6. I renamed the file and all was well.
This was in the root.
 
A

Andy Dingley

On the other hand,
404 errors in the logs are not the end of the world as we know it;

404 errors for particular target files or directories are the start of
my IP block lists against some forms of attack.

I forget just what's wrong with M$oft's favicon.ico, but AFAIR there
are something like 4 breaches of W3C rules in there: Specific
filename, specific path, specific resource format, mandatory
whitespace in the rel attribute for the <link> and maybe another one.
 
T

Toby A Inkster

Jonathan said:
"keywords" Waste of time, after all the abuse I don't think any search
engines still use them.

That doesn't mean they're a waste of time.

Search engines don't eat pizza, but pizza is still delicious. When I got
home from work yesterday evening, I spent half an hour or so making a
pizza (home made dough, home made pizza sauce, mozzarella, beef, onion and
mushroom, baked on a pizza stone). I do not consider making this pizza to
have been a waste of time, even though I'm sure it will be of no benefit
in search engine optimisation.

So by all means, include a "keywords" meta element. Yes, most web search
engines will ignore it, but search engine manipulation is not the only
reason to include metadata in your documents. There are certainly user-
agents that make use of the "keywords" meta element. (Hint: Opera does.)

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 34 days, 17:34.]

Bottled Water
http://tobyinkster.co.uk/blog/2008/02/18/bottled-water/
 
J

Jonathan N. Little

Toby said:
So by all means, include a "keywords" meta element. Yes, most web search
engines will ignore it, but search engine manipulation is not the only
reason to include metadata in your documents. There are certainly user-
agents that make use of the "keywords" meta element. (Hint: Opera does.)

Not to challenge you, more out of curiosity, how does Opera use keywords?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top