meta
which is basically metadata
is a HTML tag which provides the information about the data.
The meta data is always passed as a name-value pair.
For example in http-equiv="Content-Type"
, http-equiv
is the key name and "Content-Type"
is the value, same with charset="utf-8"
.
This meta information
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
specifies the media type which is text/html and the character set.
In HTML5, both <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
and <meta charset="utf-8" />
are the same. The latter is the just a short version. Since different languages have different character sets, charset=utf-8"
can be important in ensuring the page displays correctly across browsers.