When I try to include an HTML form in a WordPress blog post, it screws up the formatting. And yes, I am doing all my editing in the “HTML” mode and not the “Visual” mode.
Steps to reproduce problem:
1. Add a new post with this as the contents (in HTML mode!):
<form> <label>Label:</label> <input /> </form>
2. Click Preview and then view the source of the preview page. It looks like this:
<form> <label>Label:</label></p> <input /> </form>
This is problematic because we browsers interpret the added </p> tag as <p></p>, so the input box is on a new line, when it is really supposed to be next to the label.
If I put the label and input tags on the same line, then WordPress inserts a
tag between them instead of a </p>.
- The topic ‘When adding a new post in raw HTML mode, it still messes up my form's HTML’ is closed to new replies.