• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1244
  • Last Modified:

multi line quotes in meta tags?

There seems to be a conflict between optimising meta tags and html validation.

To obtain the right number of words etc. for the Description and the Keyword metatags (yes I know keyword meta tags are not important) the meta tags between quotes go over two or three liines.

The HTML validator does NOT like this and says it should not be done.
1.  Two questions how valid or important is the HTML message and should I take any notice.
2. the html validator does say the one should turn on the option to allow multi line quotes.
Getting the syntax for this is not easy.   Does anyone know it please.
Most importantly should I take any notice of any of this for optimising for Firefox and IE6?
 
0
digisel
Asked:
digisel
  • 3
  • 3
1 Solution
 
Tony McCreathTechnical SEO ConsultantCommented:
I think you are confusing new lines with line wrapping.

attributes such as the content attribute in meta tags can be any length, however they cannot contain new lines.

You seem to be entering new lines into your attributes which makes invalid html/xml and hence your error.

0
 
digiselAuthor Commented:
thanks for your comment.
the meta tags are contained within "xxxxxxxxxx"
there are no new lines as such.
this is why i am puzzled by the error messages.
can you throw any more light on this please?
0
 
Tony McCreathTechnical SEO ConsultantCommented:
could you point us to an example page that has the problem.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
digiselAuthor Commented:
Thanks for your response.
The following is what appears after running the html validator

<meta name="description" content="India travel luxury | Buy Direct | India Vacations | luxury travel India Hotel | Oberoi hotels
"> 
<meta name="Keywords" content="india travel luxury,india vacations,
luxury travel india vacations,tours,india hotels,tour,hotels,exclusive
itineraries,oberoi hotels,luxury india travel,tours,rajasthan,taj
mahal,ventours,oberoi,tiger,safari,kerala backwaters">


These are the relevant error messages relating to the Description and Keyword tags above

1. Error in line 7: This line contains part of a quoted string that spans more than one line (not recommended) or a quoted string (like an attribute value) that is missing the start or end quotation mark. Check this line for improperly quoted attribute values that may be missing a start or end quotation mark. As currently configured, HTML Validator requires that all quoted strings be contained on one line and have start and end quotation marks. Note that because of inconsistent handling by user agents, it is not recommended that attribute values contain line breaks.

2. Error in line 8: This line contains part of a quoted string that spans more than one line (not recommended) or a quoted string (like an attribute value) that is missing the start or end quotation mark. Check this line for improperly quoted attribute values that may be missing a start or end quotation mark. As currently configured, HTML Validator requires that all quoted strings be contained on one line and have start and end quotation marks. Note that because of inconsistent handling by user agents, it is not recommended that attribute values contain line breaks.

3. Error in line 10: This line contains part of a quoted string that spans more than one line (not recommended) or a quoted string (like an attribute value) that is missing the start or end quotation mark. Check this line for improperly quoted attribute values that may be missing a start or end quotation mark. As currently configured, HTML Validator requires that all quoted strings be contained on one line and have start and end quotation marks. Note that because of inconsistent handling by user agents, it is not recommended that attribute values contain line breaks.

4. Error in line 11: This line contains part of a quoted string that spans more than one line (not recommended) or a quoted string (like an attribute value) that is missing the start or end quotation mark. Check this line for improperly quoted attribute values that may be missing a start or end quotation mark. As currently configured, HTML Validator requires that all quoted strings be contained on one line and have start and end quotation marks. Note that because of inconsistent handling by user agents, it is not recommended that attribute values contain line breaks.

5. Error in line 12: This line contains part of a quoted string that spans more than one line (not recommended) or a quoted string (like an attribute value) that is missing the start or end quotation mark. Check this line for improperly quoted attribute values that may be missing a start or end quotation mark. As currently configured, HTML Validator requires that all quoted strings be contained on one line and have start and end quotation marks. Note that because of inconsistent handling by user agents, it is not recommended that attribute values contain line breaks.

6. Comment: You can allow a quoted string to exist on more than one line by turning on the option to allow multi-line quotes. However, allowing multi-line quotes may make it more difficult to find problems caused by incorrect quoting. This option is in CSE HTML Validator's Validator Engine Options.


Regards
0
 
ShaneJonesCommented:
You need to stop them going over more than one line

use this instead but make sure that you turn word wrap off and ensure that the descriptions goesover 1 line and that keywords is just 1 line

<meta name="description" content="India travel luxury | Buy Direct | India Vacations | luxury travel India Hotel | Oberoi hotels">

<meta name="Keywords" content="india travel luxury,india vacations,luxury travel india vacations,tours,india otels,tour,hotels,exclusive
itineraries,oberoi hotels,luxury india travel,tours,rajasthan,taj mahal,ventours,oberoi,tiger,safari,kerala backwaters">
0
 
Tony McCreathTechnical SEO ConsultantCommented:
Showing it in the code snippet would clarify this.

While were here,

Your description should be a sentence describing the content of the page.

I think you are over using some words in your keyword list. Some advise that you should not repeat the same word over 3 times to avoid being flagged as a word spammer.
<meta name="description" content="India travel luxury | Buy Direct | India Vacations | luxury travel India Hotel | Oberoi hotels">
 
<meta name="Keywords" content="india travel luxury,india vacations,luxury travel india vacations,tours,india hotels,tour,hotels,exclusive itineraries,oberoi hotels,luxury india travel,tours,rajasthan,taj mahal,ventours,oberoi,tiger,safari,kerala backwaters"> 

Open in new window

0
 
digiselAuthor Commented:
thanks for what you did
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now