Html page Doctype and Meta

Discussion in 'HTML' started by shapper, Mar 2, 2008.

  1. shapper

    shapper Guest

    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="">
    <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
    shapper, Mar 2, 2008
    #1
    1. Advertising

  2. shapper wrote:

    > 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.

    > <HTML>


    <html lang="en-GB">

    > <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="">
    > <meta name="copyright" content="Miguel Moura">
    > <meta http-equiv="content-language" content="EN-GB">


    I would place that in the <html> element.

    > <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">

    --
    -bts
    -Friends don't let friends drive Vista
    Beauregard T. Shagnasty, Mar 2, 2008
    #2
    1. Advertising

  3. shapper wrote:
    > 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="">
    > <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"....

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 2, 2008
    #3
  4. shapper

    shapper Guest

    On Mar 2, 1:35 pm, "Jonathan N. Little" <> wrote:
    > shapper wrote:
    > > 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="">
    > > <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"....
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com


    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
    shapper, Mar 2, 2008
    #4
  5. Jonathan N. Little, Mar 2, 2008
    #5
  6. ..oO(Beauregard T. Shagnasty)

    >shapper wrote:
    >
    >> <meta http-equiv="content-style-type" content="text/css">

    >
    >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
    Michael Fesser, Mar 2, 2008
    #6
  7. ..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
    Michael Fesser, Mar 2, 2008
    #7
  8. Scripsit Beauregard T. Shagnasty:

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

    >
    > 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.

    >> <meta http-equiv="content-style-type" content="text/css">

    >
    > 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
    you cannot be more specific even if you include the <meta> tag - there
    is no defined way to indicate the version of CSS used).

    > 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,

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 2, 2008
    #8
  9. Michael Fesser wrote:
    > .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.


    Which ones? All my browser just use the TITLE element.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 2, 2008
    #9
  10. ..oO(Jonathan N. Little)

    >Michael Fesser wrote:
    >> .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.

    >
    >Which ones? All my browser just use the TITLE element.


    Opera for example.

    Micha
    Michael Fesser, Mar 2, 2008
    #10
  11. Michael Fesser wrote:
    > .oO(Jonathan N. Little)
    >
    >> Michael Fesser wrote:
    >>> .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.

    >> Which ones? All my browser just use the TITLE element.

    >
    > 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>




    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 2, 2008
    #11
  12. ..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
    Michael Fesser, Mar 2, 2008
    #12
  13. Michael Fesser wrote:
    > .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.


    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...


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 2, 2008
    #13
  14. Gazing into my crystal ball I observed "Jukka K. Korpela"
    <> writing in news:EHDyj.305306$XC.141004
    @reader1.news.saunalahti.fi:

    >> <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,
    >


    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.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Mar 3, 2008
    #14
  15. 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.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 3, 2008
    #15
  16. ..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
    Michael Fesser, Mar 3, 2008
    #16
  17. Gazing into my crystal ball I observed "Jukka K. Korpela"
    <> writing in news:05_yj.305789$WY6.39154
    @reader1.news.saunalahti.fi:

    > 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.


    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.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Mar 4, 2008
    #17
  18. shapper

    Andy Dingley Guest

    On 3 Mar, 21:29, "Jukka K. Korpela" <> wrote:

    > 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.
    Andy Dingley, Mar 4, 2008
    #18
  19. Jonathan N. Little wrote:

    > "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/
    Toby A Inkster, Mar 4, 2008
    #19
  20. Toby A Inkster wrote:

    > 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?

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 4, 2008
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nym Pseudo

    META NAME and META HTTP-EQUIV

    Nym Pseudo, Sep 26, 2003, in forum: HTML
    Replies:
    1
    Views:
    521
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  2. Wladimir Borsov
    Replies:
    1
    Views:
    465
    Toby A Inkster
    Jan 28, 2004
  3. Duane Johnson

    Meta methods to govern meta data?

    Duane Johnson, Oct 25, 2005, in forum: Ruby
    Replies:
    6
    Views:
    213
    Adam Sanderson
    Oct 28, 2005
  4. Erik Veenstra

    Meta-Meta-Programming

    Erik Veenstra, Feb 7, 2006, in forum: Ruby
    Replies:
    29
    Views:
    332
    Erik Veenstra
    Feb 8, 2006
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,259
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page