Tag: designer

SharePoint Designer 2007 & 2010 removing closing tags

You put an <h2> or other element tag around masterpage or page layout content in SharePoint Designer 2007 or 2010.

Everything is great. You can’t believe your geeky HTML skills are still getting things done. Check in the file, approve.. BLAM you look at the page and everything is messed up! What the.. go back to Designer, check your handiwork, and you see some glaring yellow highlighting indicating that suddenly, your H1 tag or whatnot no longer has a closing element – If you HAD put <h2>..content..</h2>, the CLOSING TAG is now evaporated through sheer lunacy. Or maybe it’s following XHTML standards. Who knows – all i know is when I put in a closing tag it damn well should stay there or at least warn me that I made a boo boo:


Add an extra closing tag. So, in our example, we tried adding an <h2> </h2>tag around the ContentSection1Title tag. Designer promptly ate the closing </h2> tag. So, just add </h2></h2> at the end. Ignore SharePoint Designer highlighting the duplicate closing tag as erroneous: as soon as you press Ctrl-S and save the file it will remove one closing tag but leave the other:

There you go, hacking SharePoint Designer for stress-free WYSIWG.