Welcome to WebmasterWorld Guest from 107.20.59.213

Forum Moderators: incrediBILL

Message Too Old, No Replies

Closing for Meta Tags in HTML 401

     

montman

11:25 pm on Apr 2, 2010 (gmt 0)

5+ Year Member



I have inherited a very old website with this DOCTYPE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

When I put the closing tag like />, and run a validation check in Dreamweaver, I get the message that this is invalid, and I now understand that it needs to be closed without the forward slash.

But my question is: Will search engines use the description okay without the forward slash in the closing tag?

lavazza

11:41 pm on Apr 2, 2010 (gmt 0)

5+ Year Member



>> my question is: Will search engines use the description okay without the forward slash in the closing tag?

Yes

:)

montman

11:59 pm on Apr 2, 2010 (gmt 0)

5+ Year Member



Thank you for your answer.

montman

1:07 am on Apr 3, 2010 (gmt 0)

5+ Year Member



I was focusing on the meta description and forgot to ask: As all the meta tags are not validating, will there be any problems if I delete the ending forward slash in all of them, including this one:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

lavazza

1:31 am on Apr 3, 2010 (gmt 0)

5+ Year Member



For your files to validate as HTML4 (in contrast with XHTML) you'll have to remove ALL of the slashes in ALL meta tags - and any other self-closing tags

e.g.

<hr> NOT <hr />
<br> NOT <br />

tedster

3:14 am on Apr 3, 2010 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



And don't forget:

<img> NOT <img />

montman

4:45 am on Apr 3, 2010 (gmt 0)

5+ Year Member



Thanks so much to both of you. That is very helpful!

pageoneresults

5:23 am on Apr 3, 2010 (gmt 0)

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'd be real careful in answering with an emphatic yes on this particular issue. You might find this read from the Code Project rather interesting...

How to Stop Google Indexing Your Site. A Bedtime Story.
[CodeProject.com...]

The problem we faced was that we had specified HTML 4.01 in our DOCTYPE but were trying to use XHTML style tags (i.e. self closing meta tags). IE had no problem with it. Firefox, Opera and even my blackberry had no problem with it (or if they did have a problem they were polite enough not to say anything). Yahoo didn't have a problem. But Google did.


I'd like to think that is one of those errors that is easily recovered from. According to the above findings, that may not be the case, at least it wasn't in their particular instance.

No, follow protocol and use the proper markup for the DOCTYPE you're using.

montman

5:26 pm on Apr 3, 2010 (gmt 0)

5+ Year Member



Now I'm confused. My document is a HTML 4.01 doctype, and all the other responses said not to use the forward slash for closing tags in my pages with this doctype, and that is what the article is suggesting.

But you said to be real careful in answering an emphatic yes on this issue. Is there still risk in implementing what the other responders said? and "No, follow protocol and use the proper markup for the DOCTYPE you're using," Isn't that what the other people who posted are suggesting?

pageoneresults

5:44 pm on Apr 3, 2010 (gmt 0)

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member



My document is a HTML 4.01 doctype


If you're using an HTML 4.01 DOCTYPE, you will not have the XHTML closing elements.

Many will tell you not to worry about it because the crawlers will figure it out. Thing is, that is not always the case as evidenced by the story provided above.

It is bad practice to blend HTML/XHTML specific markup. It SHOULD be one or the other.

HTML

...">
<br>
<hr>
etc.

XHTML

..." />
<br />
<hr />
etc.

montman

5:55 pm on Apr 3, 2010 (gmt 0)

5+ Year Member



Thank you.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month