Introduction to HTML

Learn more at

We are all familiar with the Web, many of us are a bit too familiar with the Web. Web is a short way of saying "World Wide Web", sometimes called the "internet". The Web consists of billions of clients (smartphones, tablet computers, laptop computers, desktop computers, and so on) and servers (computers loaded with special software) connected through wired and wireless networks.

A web client uses a program called a web "browser" to send a request over the internet to a Web server. The server receives the request, finds the resource requested, and sends it over the internet to the client's web browser.

The server usually sends the response to the browser with a set of instructions written in HTML (HyperText Markup Language). HTML consists of tags that define the structure of a web page. It is the standard markup language for documents to be displayed in a web browser. All web browsers know how to display HTML page on the client device.

HTML works with technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript. Since this article is about learning HTML without the overhead of CSS and JavaScript, I will avoid discussing the these technologies unless absolutely necessary. It will be much easier for you to learn HTML without the overhead of CSS and JavaScript. Then, after you have completed this book, you can move on to one that discusses those additional technologies.

HTML Elements

HTML elements are the building blocks of a Web page. HTML elements are defined by tags. A tag is an abbreviation or word written in English. Every tag is delineated using angle brackets. A less-than character < indicates the start of a tag, this is immediately followed by the instruction. A greater-than character > indicates the end of a tag. An example of an instruction is <br>, which creates a line-break.

HTML provides tags to create elements such as headings <h1>, paragraphs <p>, lists <ol>, and other items. Browsers do not display the HTML tags, but use them to format the content of the Web page.


XML (eXtensible Markup Language) was initially defined in 1998. XML is used for storing and transporting data. Similar to HTML, it uses tags delineated using angle brackets. Unlike HTML, XML has strict rules about tags and their arrangement. The main rules are XML tags are case-sensitive, all XML elements must have a closing tag, all XML elements must be properly nested.

Because of the strict structure of XML, a version called XHTML (eXtensible HyperText Markup Language) was specified in 2000 to replace HTML. So now, the tags used to layout web pages must conform to the rules of XML. That means all elements must have an opening and closing tag and the opening and closing tag instruction must be in the same case.

HTML: <p>This is my paragraph text. <p>This is a second paragraph text.

XHTML: <p>This is my paragraph text.</p> <p>This is a second paragraph text.</p>

An opening tag precedes the contents of the element. A closing tag follows the contents of the element. A closing tag is a repeat of the opening tag, except it uses </ to indicate the start of the tag.

Some elements, for example br (line-break) don't have any contents, so they may use a self closing tag, for example <br/>.

In this book, I will use only code that conforms to the XHTML standard.


HTML5 is the fifth and last major version of HTML. HTML5 added new support for graphic and multimedia content, the new <canvas>, <video> and <audio> elements were added. New page structure elements such as <main>, <section>, <article>, <header>, <footer>, <aside>, <nav>, and <figure> are added.

Support for SVG (Scalable Vector Graphics) has been added. I will not be covering SVG in this book because support for SVG is not complete in all browsers, and because it's a huge topic on its own that I cover in other books. Similarly support for MathML (Mathematical Markup Language) has been added, but is incomplete in many browsers.

In this book I will use mainly code that conforms to the HTML5 standard. However, because I am not using CSS, I will need to use some HTML code that has been deprecated. Deprecated tags and attributes are those that are not supported by HTML5, and are no longer recommended for use on new Web documents. However, the code that I use is still supported by all modern web browsers.

More HTML Code:
• HTML center Tag
• The Heading Tags
• HTML Image Basics
• Using del and ins Tags to Mark Up Editing on HTML Page
• Aligning an Image on Your Web Page
• Nesting HTML Lists
• Line Breaks in HTML
• Checkbox Basics
• Use an Image as a Form Submit Button
• HTML Textarea Basics