Web Creation : The Basics of Markup

3:02:00 PM |


The basics of markup
Everything that ends up on a web page has to be specifically prepared to go there. As much as you
might wish it so, you can’t just copy everything in a Microsoft Word document and paste it into an
empty text file and call that a web page. If you did that, your page would be missing all the important
markup your web browser needs to understand what you’ve given it. Thankfully, preparing a document
for the Web—or marking up a document—is actually a simple process that involves working
within a set of tools and using them for the right purpose. The rest of this chapter will outline how
those tools came about, what they are meant for, and how best to use them. By the end of this chapter,
you’ll be able to understand that long string of HTML text just as well as your web browser does.
Where computer markup languages came from
As explained earlier, a markup language simply consists of specific kinds of annotations that identify
the components of a document. This identification allows the content to be interpreted in a meaningful
manner by any machine, user, or system, such as the hundreds of different kinds of web
browsers used today. Markup languages date back to the 1960s, having been used to define and identify
data for decades. One of the earliest standardized markup languages is called, very simply,
Standard Generalized Markup Language (SGML).

SGML was originally created for use in governmental, legal, and other complex, structured documents
that needed to be read and “understood” by computers. To this day, the Oxford English Dictionary
remains completely marked up in SGML. The language has many features and is very flexible, but ultimately
it remains too burdensome for most of today’s simple uses (such as displaying web pages).
Instead, several derivatives of SGML have become popular, such as HTML and Extensible Markup
Language (XML).
Since web pages didn’t need to be as complicated as government documents, HTML was conceived of
as a simpler and more limited derivative of SGML. However, as the Web evolved from an academic
document linking system to what it is today, it became clear that HTML was, at times, too limited.
Rather than return to the complicated all-or-nothing approach mandated by SGML, XML was developed
to create a modular markup language that would be the foundation on top of which anyone
could create their own custom markup language. Since anyone could extend this language in any way
they chose, this new specification was called the Extensible Markup Language.
Thanks to its explicit design as a modular and extensible language, XML is one of the most flexible
markup languages in use today. There are extensions to XML for all sorts of content ranging across
everything from computer configuration files to vector-based graphics and, of course, web pages. The
specific application of XML to web pages is called Extensible Hypertext Markup Language (XHTML).
Like HTML, XML uses a subset of SGML’s properties. Unlike HTML, XML defines a much more rigid syntax
and grammar for the markup language. This makes it easier to learn and easier to read for both
people and machines. Despite the rigidity in syntax, it remains flexible and open, even for storing the
most versatile data.

0 comments: