Have you ever tried to tweak the code in your WordPress website? If so, you might have tried the Code Editor in Gutenberg — or clicked Edit in HTML in a text block. The WordPress classic editor also has a Text tab that reveals the code for a page as well. Regardless of the method you’ve used, you might wonder what code this is and how it works. Let’s take a look at the programming languages WordPress uses so you can understand a bit more about how it works.
HTML — hypertext markup language — is the basic markup language that any web page uses. HTML is a linear language, so it is easy to follow and easy to learn. Essentially, you simply write out the code for what you want on a web page in the order you want it to appear. HTML uses sensical tags for its elements —
<img> for an image,
<p> for a paragraph,
<table> for a table,
<b> for bold text, and so forth.
If you decide to edit your own HTML, be aware that many tags must be closed with a slash at the beginning of a tag. For example, if you want to add italic text manually, you can do so with
<i>. When you no longer want italic text to appear, you can close the italics tag with
</i> and nothing after that point will appear in italics. (Note, though, that styles like bold and italics can also be applied through style sheets, as you’ll see below.)
PHP is the backbone of WordPress from a development standpoint. WordPress itself is written in PHP, and themes and plugins are as well. PHP is a much more complicated programming language, so it’s probably best to leave PHP changes to seasoned WordPress developers.
Next week, we’ll continue this article with another language WordPress uses, CSS.