Meta Tags with CSS

liunx

Guest
hi.

i was wondering whether it's possible to add meta tags on an external css file so that each html page calls it.

thx in advanceI don't think it's possible with CSS, that's different from the HTML that reads them(and a search engine wouldn't be able to find them = gross ERROR)

you could use javascript to include them, but then you'd ignore 10% of visitors...If i were to use an external .js file with the meta tags, how would search engines handle it?

if i put a "noindex nofollow" tag on a .js how will a search engine deal with it? will it understand that it should ignore the html file that calls that .js ?

thxI'm not certain that I understand what you are up to, but if I do then you will find the information at <!-- m --><a class="postlink" href="http://www.w3.org/TR/html401/present/styles.html#h-14.6">http://www.w3.org/TR/html401/present/styles.html#h-14.6</a><!-- m --> useful.I assume you are just trying to find a way to avoid repeating meta tags in every page when editing? If so CSS is not the right thing to be looking at. Apart from the fact that it is not possible it would be a gross misuse of CSS since CSS should only contain presentation information not content and meta tags are content, albeit a special kind of content.

I would also not recommend javascript, I think you need to look at either a server-side include method (SSI or any server-side scripting language like PHP,ASP etc. can do this) or if you dont have them available and it is just to cut down on maintenance then explore editing tools that can solve this for you (e.g. dreamweaver has templates and libraries for including common code into multiple pages).

HTH,

Daii do use libraries for it :cool:

i was just curious to know if it could (or should) be done with css.

thxOriginally posted by cogumelo
i do use libraries for it :cool:

i was just curious to know if it could (or should) be done with css.

thx


it cant be done with css. CSS is strictly for styling.

JS cannot be used for this as mentioned above either and it has nothing to do with ignoring 10% of the ppl. People could care less if you have meta tags on your site. What matters is the search engines and they wouldn't be able to read it so you might as well not have it then.

Only option would be either a server-side language or SSI (server side includes). I haven't used either yet :( but many in this forum could help you out there :) tcWhat matters is the search engines and they wouldn't be able to read it so you might as well not have it then.

that's what i was trying to figure, search engines would not be able to get the metas if they were placed in a js file.

thx
 
Back
Top