function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Srinath TeramSrinath Teram 

HTML tag in VF Page

I have requirement which intends to add <html lang="en"> to a visualforce page. When I add this particular line to my VF page, it renders out in browser ("view page source") as expexcted. However, an additional <html> also appears in the browser as default.:

<html>

<html lang = "en">

......

......

</html>

</html>

 

Could anyone please guide me on how to remove the default <html> tag?

 

-Srinath

Best Answer chosen by Admin (Salesforce Developers) 
Srinath TeramSrinath Teram

I got solution for this myself.

In the VF page, for <apex:page> tag add an attribute - applyHtmlTag="false". This simple attribute did the trick.

 

Thanks

Srinath