A Basic Guide To HTML For WordPress Users
Having a basic knowledge of HTML can be useful when creating, editing or formatting content on your WordPress site.
In this tutorial you will learn the basics of using HTML code in WordPress.
Note: You don’t need to know HTML to use WordPress. WordPress has a powerful built-in visual editor that allows you to easily format your content simply by clicking on a few buttons. As you will learn below, however, knowing a little bit of HTML can save you time and money.
Watch the short video below and then complete the step-by-step tutorial to learn more about using HTML in your WordPress content …
Having a basic knowledge of HTML can be useful when running and managing your own web presence.
For example, here are some situations where having a basic understanding of HTML can help you save time and money:
- You want to add some formatted text and a hyperlinked image to an area of your sidebar or direct visitors to your contact form, newsletter subscription page, etc… in your user profile description. If you know basic HTML, you can do this very quickly without using code editors.
- You decide to outsource your content creation to a freelance writer and receive back files containing HTML code. Knowing basic HTML helps you better proof your content before you accept the work.
- Someone else is responsible for creating and publishing content on your site. You see a couple of text formatting errors or hyperlinks that are either missing, or pointing to the wrong destination. Knowing basic HTML can help you fix simple things in your content very quickly without having to ask (or pay) a webmaster, or web designer to do it for you.
- Knowing basic HTML can help you communicate more effectively with web developers and web designers when discussing your website requirements, and also make you sound more confident and knowledgeable when presenting your website ideas or requesting custom work to be done on your site.
What Is HTML
HTML is an acronym for HyperText Markup Language.
According to Wikipedia’s definition of HTML …
HTML is the main markup language for creating web pages and other information that can be displayed in a web browser.
HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>), within the web page content. HTML tags most commonly come in pairs like <h1> and </h1>, although some tags, known as empty elements, are unpaired, for example <img>. The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, tags, comments and other types of text-based content.
The purpose of a web browser is to read HTML documents and compose them into visible or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page.
Source: Wikipedia, HTML
Important: Like everything else on the Internet, HTML is also subject to changes, and some of these changes will affect WordPress.
Currently, HTML is in version 5 (also called HTML5), and this change has introduced a number of new “tags” to keep up with new advances in software and browser technology. As some of the tags used in older and even recent versions of WordPress are being phased out of HTML5, you can expect that WordPress will also keep updating its software to remain compatible with industry-wide coding standards.
Using HTML in WordPress
We address the WordPress Visual Editor and how to create / add content to Posts and Pages in separate tutorials.
HTML Tags Allowed In WordPress
The WordPress Content Management System (CMS) and publishing platform allows you to insert many commonly-used HTML tags into the Text editor, including the tags below …
Here are some examples of simple, practical applications that use some of the HTML tags listed above …
As mentioned earlier, you don’t need to know HTML to use WordPress, but it can be useful to know the basics of HTML. In certain situations, this may even save you time and money.
If you are interested in learning more about using HTML, then see the link below for Free HTML tutorials:
The WordPress Text Editor Explained
By default, the WordPress Text Editor comes with a number of standard menu buttons already installed …
Here is a brief description of the function of each of the Text Editor menu buttons (refer to the screenshot above):
- b: <strong></strong> Use this HTML tag for strong emphasis of text (i.e. bold).
- i : <em></em> Use this HTML tag for emphasis of text (i.e. italicize).
- hyperlink: <a href=”http://example.com”></a> Use this HTML tag to add a hyperlink to your selected text
- b-quote – <blockquote></blockquote> Use this HTML tag for quoted or cited text.
del: <del></del> Use this HTML tag to label text considered deleted from a post. Most browsers typically display this as striked-through text.
- ins: <ins></ins> Use this HTML tag to label text considered inserted into a post or page. Most browsers typically display this as underlined text.
- img: <img src=”http://www.yourdomain.com/img/image.jpg” alt=”image description” /> Use this HTML tag to insert an image into your post or page.
- ul: <ul></ul> Use this HTML tag to insert an unordered list into your post. Unordered lists typically display as a bulleted list of items.
- ol: <ol></ol> Use this HTML tag to insert a numbered list. Items in an ordered list are typically numbered (just like the list you are reading now!).
- li: <li></li> Use this HTML tag to insert or turn your selected text into a list item. (This tag should be used in conjunction with the ul or ol tag).
- code: <code></code> Use this HTML tag for preformatted styling of text. Generally sets text in a monospaced font, such as Courier.
- more: <!–more–> Use this WordPress tag to break a post into “teaser” and content sections. For example, if you type a few paragraphs, then insert this tag and compose the rest of your post, users will only see the first paragraphs of your post or page with a hyperlink ((more…)), which when clicked on, will display the rest of the post’s content.
- Close Tags – Closes any open HTML tags left open. Please note: proof your content after using this function to ensure that all tags have formatted your text correctly.
- fullscreen – click this button to work in “full screen” mode (see screenshot example below). You can toggle between the Visual Editor and Text Editor modes, insert media and hyperlinks and update your content while in “full screen” mode. Click Exit fullscreen to return to the normal text editor display …
Some Useful Tips Related To Using HTML In WordPress
Tip #1: Some sections of your WordPress site like some sidebar “widgets” and user profile areas allow you to use HTML-formatted content but they don’t provide you with a Visual Content (WYSIWYG) editor like the one that is built-in to the editing screens of your Posts and Pages …
If you want to design or edit web pages using HTML, there are several FREE HTML Editor software applications that you can download. A popular FREE HTML editor, for example, is KompoZer.
KompoZer is Free Open Source software built as a complete web authoring system that combines web file management and easy-to-use WYSIWYG web page editing. It’s designed to be extremely easy to use, especially for non-technical computer users who just want to create attractive, professional-looking web pages without needing to know HTML or web coding.
If, however, you have no need or desire to go into anything of a technical nature, but would still like to be able to easily insert and format content containing basic HTML tags into areas of your site like your sidebar, author profile, etc…, then see the tutorial below for a really simple solution that involves no extra time and requires no additional downloads.
Tutorial: How To Add Formatted Text To The “About Yourself” Section Of Your Profile
By default, whenever a post is published on your WordPress site, a link to the author is displayed at the bottom of the post …
Clicking on the author link takes you to the Author Archives section, where site readers can learn more about you (or other authors registered as users on your site) and see other posts that you (or other authors) have published …
You can add hyperlinks and simple text formatting like bold and italicized text to enhance your author description and further promote yourself, your services, products, other websites, etc. to your site visitors …
This is done by adding HTML formatted content into the About Yourself > Biographical Info field in your Profile section …
You will notice, however that, although the Biographical Info text box allows you to paste HTML-formatted content into the text area, it doesn’t actually provide you with a content editor to do so …
This means that you either have to type in the content with the HTML code, or paste the content with the HTML already embedded into this text field.
Let’s “paste the content” into this field using the simple method described below.
Create a new post and type in your content into the Visual Editor (if you need help with this step, see this tutorial: How To Create A New WordPress Post).
In this case, we want to create an author description …
Format the content using the Visual Editor tab (if you need help with this step, see this tutorial: Using The WordPress Visual Editor). …
Continue working in the Visual Editor tab until you have added all of the formatting you want to display in your author description. Please note that you will only be able to use simple formatting in your author description such as hyperlinks, bold, underline and italicized text …
Once you have created your content, switch over to the Text Editor and copy all of the content you have just created to your clipboard …
Go to your profile by selecting Users > Your Profile from the main navigation menu …
Scroll down to the About Yourself section and paste the content from your clipboard into the Biographical Info text area ….
Click the Update Profile button to save your changes …
Congratulations …You have just created an author description for your content and formatted it using basic HTML!
Tip #2 (Advanced WP User): You can enhance the function of your WordPress Text Editor using plugins.
For example, you can add a Free WordPress plugin to your site called Extensible HTML Editor Buttons that allows you to have better control of settings for HTML tags like div and span, for example, as well as add custom buttons and additional function to your text editor …
Another Free WordPress plugin you can use is HTML Editor Reloaded …
This plugin allows you to add your own custom buttons to the WordPress Text Editor toolbar. For example, you can add an H1, H2, H3 button to make adding headers to your content easier …
Tip #3 (Advanced WP User): By default WordPress does not allow some HTML tags to be used for security reasons (e.g. codes such as embed, frame, iframe, form, input, object, textarea and others) .
If you experience any problems adding common HTML tags into your content that are allowed to be used in WordPress, try disabling the visual editor in your user profile …
After disabling the visual editor and saving your new profile settings, go back to your post or page and reinsert the content with the problematic HTML tags, then save or publish your post.
If the above suggestion fixes the issues you were having with adding HTML to your content, go back to the Profile page, reactivate the visual editor, and check to see if the HTML code is still working fine with the visual editor restored.
Note: If the above suggestion does not fix the issue and you continue experiencing problems adding HTML code to your site, you may need to look at other options. This may include:
- Asking someone with experience troubleshooting WordPress errors to help you
- Searching the WordPress Support Forum for possible causes and recommended solutions
- Searching for WordPress troubleshooting tutorials online
- Reinstalling your WordPress application (i.e. performing a clean installation)
- Contacting your web host
To learn more about editing your profile settings, see this tutorial: How To Edit Your WordPress User Profile.