How Does It Work?
Text alone is just a collection of words. Once strung together in a sentence or paragraph, punctuation makes them understandable and gives them meaning.
In HTML, the punctuation marks are called “tags.” Here’s a simple example:
Say you want to add the line, “Is HTML really so easy?” as its own paragraph on your Web page. In Hypertext Markup Language, it looks like this:
<p>Is HTML really so easy?</p>
To give emphasis to a word using italics – “Is HTML really so easy?” – add another pair of tags:
<p>Is HTML <em>really</em> so easy?</p>
Now, to put the same word in boldface, add another pair of tags:
<p>Is HTML <em><strong>really</strong></em>so easy?</p>
When a Web browser reads that code, this will appear on your page:
Is HTML really so easy?
You’ll notice that for every tag, like <p> for the start of a paragraph, there is also a closing tag – in this case </p>, for end of paragraph – that includes the slash mark /. The italics tag <em> means “emphasis,” and <strong> means boldface. (Old school HTML uses <i> for italics and <b> for boldface, but working with the newer tags will prepare you for using CSS – or Cascading Style Sheets – for even more flexibility and functions).
Of course there’s much more to this language than three pairs of tags – far too much to cover here. But if you want to keep going, these are great places to start: