문제

Is it ok to have this kind of meta declarations in the head section of a XHTML document?

<meta name="keywords" lang="en" content="..."/>
<meta name="description" lang="en" content="..."/>
<meta name="keywords" lang="ro" content="..."/>
<meta name="description" lang="ro" content="..."/>
<meta name="keywords" lang="fr" content="..."/>
<meta name="description" lang="fr" content="..."/>

etc

Basically is it good to have all at once, or should I just put two by two depending on what language is selected?

Thank you.

도움이 되었습니까?

해결책

Is it ok to have this kind of meta declarations in the head section of a XHTML document?

Yes, it's perfectly valid to do so; you can find a similar example in the HTML4 spec on the META element. The XHTML spec additionally suggests that you also add xml:lang when using lang.

Basically is it good to have all at once, or should I just put two by two depending on what language is selected?

This is a choice you must make depending on various factors. If you have a large number of languages and it's easy for you to dynamically generate a page with just the selected language, do so because it will save bandwidth. Otherwise, you can leave it as it is. Both ways are correct though.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top