Adding simple formatting is harmless. You can easily bold words, change the appearance of fonts, etc. It becomes a problem when the merchant believes that throwing a bunch of random HTML code in a variable will somehow come out correct - and if it seems visually Ok, then they assume they did it right. Here is a partial list of problems I see often:
This is probably the most common mistake I see. They start bolding something with a < b > tag, and forget to close it. In this case, it will just end up bolding most everything on the page starting at the opening < b > tag. But, things can get worse. If you include a tag that actually affects layout, for example an opening < div > tag or < table > tag, that stray tag can potentially break your page's layout completely. And, taking it a step further, if you open a < style > or < script > tag, but don't close them, the page may stop rendering completely (i.e. come up blank.)
Closed tags without opening
This is sort of the opposite of the previous mistake. When you throw in a closing tag without first opening it, you will most likely completely break the layout of your page(s).
This is a combination of the previous two. Sometimes people throw in opening tags and closing tags at random, and in random order. If each of your opening tags have closing counterparts but in the wrong order, chances are most modern browsers will figure out what to do, but why make the browser's work miserable? Follow this easy rule of thumb: if you open a tag, such as < b >, when you are done with it, close it. That's really it.
Including main document tags such as < html >, < head > , or < body >
So if you wanted to write a post-it note for yourself with the most important rules of adding html to your caption fields, write these:
- If you open an HTML tag, always close it, and in reverse order.
- Never use these tags in your store editor fields: < head >, < /head >, < body >, < /body >, < html > and < / html >