How to Edit the HTML Code on a WP Blog
- 1). Log in to the WordPress dashboard. Navigate to "Posts" or "Pages" and click on a title to edit its contents. On the editing screen, click the "HTML" tab at the top-right corner of the editing box. You will see some different buttons across the top, and the box will display HTML code instead of formatted text. Use the XHTML standard when coding HTML within the WordPress editor. Non-standard tags like <iframe> disappear if you click to "Visual" and then "HTML" again.
- 2). Click the "Visual" tab to check your work. When satisfied, click the blue "Update" button and check the post or page in the browser. Although the visual editor displays text and images with some formatting, unless the theme has extra code for the editing screens, the content will look different in the editor than it does on the page. Edit your post or page as needed until it looks the way you want.
- 3). Click "Appearances" and then "Edit" to edit template files and other files within your installed themes. There you can edit the HTML of any file within the theme. Files are listed on the right-hand side of the editing box. It is a good idea to backup the theme files on your computer so you can re-upload them with an FTP program if you get a "white screen of death." White screens happen when there is a fatal error in the PHP code, and you can easily cause an error by mistake when editing template files.