WordPress grew into a great CMS system. However some end-users who’d like to use both WYSIWYG and HTML editors can be quite a surprised with the way they HTML code gets treated. WordPress tries to maintain high HTML5 standards and also to make its visual editor to look as smart as possible, so switching from HTML to WYSIWYG will clean your code a bit. Keeping the following things in mind while writing your HTML code inside of WordPress content editor may save you some nerves:
- All empty tag container (e.g. <div..></div>) will be stripped.
- All code formatting (e.g. new lines, indents) will be changed.
- Paragraph tags will be hidden but not stripped.
- A space before closing /> of self-containing tags will be added in case you have not put it there.
- WordPress will also put all in-line elements not contained into block elements into paragraph container.
- s and <br/>s will be stripped.
- All blank attributes of all tags will be stripped (critical for <a> tags).
Schreibe einen Kommentar