Search code examples
htmlxmlsharepointbranding

Error Message saying XML is invalid on SharePoint master page


I am branding SharePoint and when I upload the master page I get an error that says

The 'html' start tag on line 162 position 2 does not match the end tag of 'head'. Line 171, position 3.

So I check my html file and I can't seem to find what's wrong. Here is the html: https://codeshare.io/GbvxJV


Solution

  • I have reviewed your XML file and find out below bugs:

    • You need to add <html> tag below <!DOCTYPE html> tag.
    • The second change is, you need to complete your <head> tag (before <body> tag starts) at line number 162, as suggested in error as well.
    • There are lots of <SPM> tag that are spit in multiple lines. They need to be in single line.

    When I make these changes, I was able to convert your HTML file to Master Page.