You need to sign in to do that
Don't have an account?
Ken Koellner
I need to put a meta tag inside the <head> </head> area of a VF page.
Anyone know a way to put a <meta .../> tag in the <head> </head> area of a page rendered by VF?
If I just include meta tag I need -- <meta name="viewport" content="width=device-width, initial-scale=1.0"/> after the <apex:page .../> tag, it comes out in the body when VF renders the page. Even with standard styles off.
If I just include meta tag I need -- <meta name="viewport" content="width=device-width, initial-scale=1.0"/> after the <apex:page .../> tag, it comes out in the body when VF renders the page. Even with standard styles off.
Here's the sample code for you,
Please mark this as the best asnwer if this helps
The applyHtmlTag and applyBodyTag options control whether or not SF generates them. Without them set to false, adding your own <html> and <head> tags results in duplicates. If you create a page with Vasani's example and this one, you can see the difference. Again, if you want your own <body> tag set applyBodyTag to false and it won't generate it either.
More info here:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_page.htm