homepage Welcome to WebmasterWorld Guest from 54.205.247.203
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
How important are the "" in Meta Tags and elsewhere?
thaedge




msg:598749
 8:51 pm on Jun 3, 2005 (gmt 0)

Currently a site is quite heavy, and looking to speed it up using some Compression Tools. The favorite so far has done quite well, but we are noticing something... it takes out many of the " from tags.

From what Im told (Im not directly working on it) its doing it in <table>, <td>, Meta Tags and some other places.

Does anyone know of this type of thing having a serious effect on how Browsers show your page and how Search Engines read your page/meta tags/links and such?

Im sorry Im not more specific, but havent had time to dig into exactly what all is being changed yet (I was just told some 30 min ago).

Thanks to anyone with some insight.

 

Herenvardo




msg:598750
 11:48 am on Jun 4, 2005 (gmt 0)

In HTML 3.2 and 4, is not too clear when are needed the quotemarks. Indeed, browsers that deal with this files, figure out the arguments well enough when the "" are missing. Since XHTML, the marks are suposed to be mandatory; even so, the browsers that work with XHTML do work also with older versions, so they are can render the document with missing "s, even when the validators would complain about them.
As a general rule, when the text to be "ed has neither spaces nor symbols, the "s can be ommited with no risk. The bots and browsers won't need the quotes if the text is simple enough. Otherwise if you have to put things like href="mailto:somebody@somewhere.com?Subject=Some thing" then you'll need to put these quotes (otherwhise, the bot/browser could assume that thing is the next parameter, or even break the sequence on the :)

Hoping be useful,
Herenvardö

asquithea




msg:598751
 10:58 am on Jun 5, 2005 (gmt 0)

In general, I would recommend getting as close to the XHTML code style as possible while using HTML 4 strict. That means using quotes on all attribute values, closing all paired elements, and validating your code with the W3C parser.

Why?

I believe that time wasted in maintenance dealing with issues caused by sloppy code far outweigh any benefits. How much will it cost you if you have to spend hours fixing a strange bug in a browser you haven't tested? Or if you come back to the code some time later, and misunderstand something you did? Or even if you change your mind later? You do use a version control system, don't you?

You can reduce page size far more effectively with other tricks:
- Use the best compression mechanism for your images.
- Use GZIP compression to serve your pages.
- Eliminate unneccessary table layouts.

skr325




msg:598752
 3:05 pm on Jun 7, 2005 (gmt 0)

Jumping in better late than never, this compression tool is using GZIP and it appears that a by-product is the removal of some of the "s throughout the code.

Trust me, good code is the way to go, but in the meantime we have probably 30% of our users being upset by our page load times and a mountain of other work.

In lieu of correcting all of the code (which we'd like to do over time) we are trying to get some bang for our buck using compression.

Any additional ideas or tool options for this would be welcome.

Thanks...

4specs




msg:598753
 3:20 pm on Jun 7, 2005 (gmt 0)

gzip should be lossless - ie no changes when compressed. I have used gzip (via php) and have never seen any loss of "'s. I look at the XHTML Transition site via FoxFire and use their tools and have never seen a problem.

thaedge




msg:598754
 7:02 pm on Jun 10, 2005 (gmt 0)

Thanks all - so far no ill effects anywhere in the code/browser display or in the SE rankings yet. A few places it does appear that the " were stripped but nothing too major.

One less thing I will have to worry about now :)

g1smd




msg:598755
 4:24 pm on Jun 13, 2005 (gmt 0)

Run the pages through [validator.w3.org...] and let it be the judge of how good or bad the code is...

ogletree




msg:598756
 4:44 pm on Jun 13, 2005 (gmt 0)

Meta tags have no value anyhow so that does not matter. I have no meta tags on any of my sites. Meta tags exist so armature seo's can show people that they are actually doing work. In my opinion it is no different than if an appliance repair company decided to send out a flyer to everybody telling them they need to have 30 squares of different color tape on the back of their appliances. And if they don't do this their food will go bad. Any SEO company that is worth anything does not need to seek out clients or does not take clients. Anybody left is just trying to make a buck off the ignorant.

asquithea




msg:598757
 6:13 pm on Jun 13, 2005 (gmt 0)

Meta tags have no value anyhow so that does not matter.

Not really true. I use the description meta tag on the front page of an otherwise poorly-optimized website, and Google responds by using the description as the link abstract. Exactly the behaviour I'd hoped for, and a hell of a lot easier than rearranging the page and menus to ensure that the first few lines of text were highly descriptive.

(I don't do SEO -- this is a rarely used personal web-database)

bill




msg:598758
 2:56 am on Jun 14, 2005 (gmt 0)

Meta tags have no value anyhow so that does not matter.

I find them pretty useful for setting the proper character set...
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
thaedge




msg:598759
 2:42 pm on Jun 14, 2005 (gmt 0)

Thank everyone for your input but you seem to be only looking at the Meta Tag part of my initial question. I was also curious of the effect on other html elements such as forms, td, table and such.

Thanks Herenvardo for your insight and g1smd for the validator - been out of the office so will take a look at that later today.

It appears that my worries were for nothing then and that the " arent really needed (100% of the time). I never thought they mattered, but assuming such a thing and having Browsers blow up or SE's curse at you isnt something I wanted to have happen :).

g1smd




msg:598760
 7:40 pm on Jun 14, 2005 (gmt 0)

In XHTML, every attribute value must always be in quotes.

In HTML 4, every attribute value that contains virtually anything other than just A to Z and 0 to 9 must be in quotes. Certainly anything with a / or a # or a space in it MUST always be quoted.

.

From: [w3.org...]

>> In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them.

rocknbil




msg:598761
 11:00 pm on Jun 14, 2005 (gmt 0)

Meta tags have no value anyhow so that does not matter.

This topic has been beaten to death but I don't know if it's truly dead. :-) I hear the above over and over, from many sources, but guess what I found today?

I was pointed to a site by someone as an example. The main page consisted of a Flash header with navigation (bad), a mission statement composed of an image (worse,) and no other textual content on the page other than the four text links at the bottom (worst.)

Thinking of this thread, I promptly Googled the URL. To my surprise, there was a full text description on Google, but it was nowhere on the page, not even in the ALT tags of the image or description/comments generated by Flash's publish settings (which this developer used right out of the box.)

But. It was a word-for-word match on the META description tag.

So once again, I'm on the fence about using or not using meta tags. When in doubt, use them, quote them, do everything you know of that's specified anywhere.

g1smd




msg:598762
 11:38 pm on Jun 14, 2005 (gmt 0)

Your document should begin with a !DOCTYPE (this tells the browser what sort of HTML is in the file) followed by the <html> and <head> tags:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

For your page to actually be valid you MUST declare the character encoding (lets the browser know whether to use A to Z letters (latin), or Chinese, Japanese, Thai, or Arabic script, or some other character set) used for the page, with something like:

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

There are also other schemes such as UTF-8 and many others.

It is also a good idea to declare what human language the page is in, using:

<meta http-equiv="Content-Language" content="EN-GB">

The language and country codes come from ISO 4217 and ISO 3166. This is useful for online translation tools as well. Change the "en" and "gb" to whatever language and country you need.

You need a <title> element for the page:

<title> Your Title Here </title>

This is displayed at the top of the browser window, and stored as the name of the bookmark if someone bookmarks the page URL in their browser. Most importantly, it is the <title> tag that is indexed and displayed by search engines in the search results page (SERPs).

You need the meta description tag, as this is very important for search engines, and it is useful but not vital to have a meta keywords tag:

<meta name="Description" content=" Your Description Here. ">
<meta name="Keywords" content=" your, keyword, list, here ">

Most search engines do obey the robots meta tag. The default robots action is index, follow (index the page, follow all outbound links) so if you want something else (3 possibilities) then add the robots tag to the page in question. If you want to exclude whole directories then use the robots.txt file for this instead of marking every HTML file with the tag.

<meta name="robots" content="noindex,follow">

The last parts of your header should have your links to external style sheets and external javascript files:

Use this if the stylesheet is for all browsers:

<link type="text/css" rel="stylesheet" src="/path/file.css">

Use this for style sheet that you want to hide from older browsers, as older browsers often crash on seeing CSS:

<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"> @import url(/path/file.css); </style>

Use this for the javascript:

<script type="text/javascript" language="javascript" src="/path/file.js"></script>

End the header with this:

</head>
<body>

and then continue with the body page code.

It is as simple as that.


Code within the page:

I use: <a href="somepage.html" title="some text here"></a> for links.

I use <img src="somefile.png" alt="some text"> for images.

Headings are done with <hx></hx> tags, properly used from <h1></h1> downwards.

rocknbil




msg:598763
 4:21 pm on Jun 15, 2005 (gmt 0)

Your document should begin with a!DOCTYPE (this tells the browser what sort of HTML is in the file) followed by the <html> and <head> tags:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Just FYI, the doctype declaration is useless without a url:

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

ogletree




msg:598764
 6:31 pm on Jun 19, 2005 (gmt 0)

Ok yes if you have no real textual content on your page then yes use the description. I was mostly talking about keyword and the zillion other tage people put on pages. SEO's need to show something to charge for so lots of META tags does the trick.

g1smd




msg:598765
 11:02 am on Jun 20, 2005 (gmt 0)

You only need what I included in the above post. No more, no less.

The DOCTYPE should have a full URL, yes, but that can cause the layout to change. I always recommend a new user to use the "short" DOCTYPE, and that is enough to get the pages through the validator. Most new users have a lot of code errors: nesting problems, invalid attributes or values, and so on. The first priority must be to tidy the code so that is at least valid. When the user becomes more experienced, then that is the time to study, in depth, the differences between strict and quirks mode in various browsers. I wouldn't foist that on to a new user right away.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved