S
S
Sergey Pronin2014-07-22 16:17:07
Yii
Sergey Pronin, 2014-07-22 16:17:07

How to make correct valid metadata?

There are old tabular sites for online stores with IE7 support and the task is to make the site more valid.
sites are built on Yii
in the header

<!DOCTYPE html>
<html lang="ru">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <meta name="language" content="ru"/>

<meta charset="кодировка">
I can't set the snag in method data , "charset" IE9+, so I leave
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>.

But I <meta name="language" content="ru"/>can not find why it is used at all.
WC3 swears at him "Bad value language for attribute name on element meta: Keyword language is not registered." .
Please let me know if it can be removed without breaking backwards compatibility.
And what about these headers in HTML emails.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Z
zooks, 2014-07-22
@stDragon

No need to reinvent the wheel:

<!DOCTYPE html>
<html lang="ru">
<head>
  <meta charset="utf-8">

For ancient IE paste
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

PS do not listen to those who write that valid HTML is not needed. This is the opinion of hackers.

O
olamedia., 2014-07-22
@w999d

ru-RU maybe? used to set the language of the document.
charset="" is html5
and you shouldn't worry too much about validity at all. try to check the validity of google.com or yandex.ru - you may be very surprised.

M
Maksim Zverev, 2014-07-22
@m1skam

Excuse me, but why do you need valid sites? Validation is piskomerstvo only among the front-end, if the site is displayed the same everywhere, well, or with reasonable degradation on lower versions of browsers, then what's the difference passes validation or not?
If from the position of SEO, then there are generally accepted rules / good advice on markup, but I have not heard that a non-valid site would be artificially underestimated in search engines.
I went through several top sites from Yandex, none of them pass validation.
As <meta name="language" content="ru"/>for your html5 declaration, it means that your language is already specified in <html lang="ru">
Why again?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question