radbyx
radbyx

Reputation: 9660

One or multiple meta-tags?

I just realized I have two meta tags in my HTML head:

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">

Do both work when there are multiple? Should I merge them? Is it just as good with having multiple meta-tags?

Upvotes: 1

Views: 2576

Answers (2)

ViRuSTriNiTy
ViRuSTriNiTy

Reputation: 5155

It is completely normal to have multiple meta tags, also you can't merge them according to the answer of unor.

Upvotes: 3

unor
unor

Reputation: 96607

Have a look at the definition of the meta element. It says:

Exactly one of the name, http-equiv, and charset, attributes must be specified.

So your two example meta elements couldn’t possibly be merged, because then the meta element would have the charset and the name attribute, which is not allowed.

Upvotes: 3

Related Questions