knox-flaneur
knox-flaneur

Reputation: 149

How do you add an attribute to the html tag in SharePoint masterpages?

I want to turn the following tag produced in SharePoint 2013 master pages:

<html dir="ltr" lang="en-US">

into the following:

<html dir="ltr" lang="en-US" **xml:lang=”en”**>

It is controlled by the following:

<SharePoint:SPHtmlTag dir="<%$Resources:wss,multipages_direction_dir_value%>" 
                      ID="SPHtmlTag"
                      runat="server" >

Upvotes: 1

Views: 744

Answers (1)

Mark Mascolino
Mark Mascolino

Reputation: 2292

I think you are out of luck as that control and the asp.net Control superclasses don't appear to give you an option to set/generate the xml:lang attribute. You could convert:

<SharePoint:SPHtmlTag dir="<%$Resources:wss,multipages_direction_dir_value%>" 
                      ID="SPHtmlTag"
                      runat="server" >

to something like:

<html ID="SPHtmlTag" runat="server" xml:lang="en" dir="ltr" >

but you'd be missing out on anything else that control was doing for you.

Upvotes: 2

Related Questions