Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having two viewport meta tags - will one get overwritten?

I would like to add the following property to my codebase:

<meta name="viewport" content="minimal-ui" />

However my project uses some centralised code which includes the following later down the page:

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

Can anyone advise if the tags will clash or override each other?

like image 705
user2494247 Avatar asked Jan 30 '14 10:01

user2494247


1 Answers

I think the meta tag is handled like the title tag. If you use more than one, they get overridden by the later ones.

I do not recommend to use more than one meta viewport, the page wouldn't get validated by the W3C validator.

like image 50
andreasbecker.de Avatar answered Sep 29 '22 04:09

andreasbecker.de