What is HTML?
By Stephen Bucaro
A webpage consists of text. When you display a webpage in your browser, it usually
has a nice layout with sections, columns, and paragraphs. Your browser knows how
to layout the webpage because it follows layout instructions embedded in the text.
The instructions are called HTML (Hypertext Markup Language). The actual instructions
themselves are called "HTML tags". The tags themselves are text, and the text of
each tag is identified by a leading < (less-than) character, and a following >
(greater-than) character. A specific HTML tag to create a table is shown below.
The first HTML was used in 1989 by the physicist Tim Berners-Lee working at the
CERN particle physics laboratory in Geneva Switzerland. It was used to share documents.
HTML was derived from a formatting language called SGML (Standard Generalized Markup
Language) which was created by the IETF (Internet Engineering Task Force) in 1993.
HTML is sometimes called a markup language because it's used to "markup" text
and data to add instructions for how it should be laid out. Initially HTML
started out with tags for 18 elements. But as later versions were specified the
number of tags grew. Then along came XML (Extensible Markup Language).
Although XML looks similar to HTML, XML actually tells you nothing about the
layout of the document. Instead it describes the data within the XML tags. I know
that I promised to focus on just HTML, but let me explain why I mention XML. XML has
strict rules that were eventually applied to HTML creating what is called XHTML.
Lets compare the tag for a button in HTML with the tag for a button in XHTML.
<input type="button" value="Calculate">
Note in the XHTML example, there's an opening tag <button> and a closing tag
</button>, while the HTML example has just an opening tag. The closing tag is
specified using a / (slash) after the tag's < (less-than) character. In XHTML
it's also legal to use just one tag and place the / just before the > (greater-than)
character as shown below.
<input type="button" value="Calculate" />
This form is sometimes preferred because it's understood by older non-XHTML
Another strict rule of XHTML is that tags must be nested in reverse order of how
they were declared. In other words, in HTML the following code was acceptable.
<strong><em>This text is bold and italic</strong></em>
However in XHTML the tags must be nested like this:
<strong><em>This text is bold and italic</em></strong>
Or like this:
<em><strong>This text is bold and italic</strong></em>
Imposing these rules makes XHTML display more reliably and makes its it easier
to understand, and I believe closing tags and reverse order tag nesting is the
future of HTML (XHTML). It would be a disservice for me to teach you bad old
unstructured HTML, so although the title of this eBook is Just HTML, you'll
actually be learning just XHTML.
Another version of HTML (HTML5) designed primarily for publishing for eBook
readers and mobile devices has been released. However, not all browsers have
implemented the entire HTML5 specification, and before they do, it looks like
the XHTML5 specification will be released. So near the end of this eBook, I
introduce some features of HTML5.
More HTML Code:
• Using del and ins Tags to Mark Up Editing on HTML Page
• Changing the Size of an Image on Your Webpage
• The HTML Head Tag
• How to Debug HTML
• HTML5 role Attribute
• HTML abbr and acronym Tag
• HTML List Basics
• Divide a Table Into Head (thead), Body (tbody), and Footer (tfoot) Sections
• HTML center Tag
• HTML title Tag