radbyx radbyx - 10 months ago 81
HTML Question

One or multiple meta-tags?

I just realized I have two

tags in my HTML

<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?


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.