Tuesday, 23 December 2014

Introducing Html

As its name suggests, HTML is a markup language, which may sound complicated until you realize
that you come across markup every day. When creating a document in a word processor, you can add
styles to the text to explain the document’s structure. For example, you can distinguish headings from
the main body of the text using a heading style (usually with a larger font). You can use the Return
(or Enter) key to start a new paragraph. You can insert tables into your document to hold data or create
bulleted lists for a series of related points, and so on. Although this does affect the presentation of
the document, the key purpose of this kind of markup is to provide a structure that makes the document
easier to understand.
When marking up documents for the web, you perform a similar process, except you do it by adding
things called tags to the text. With HTML, the key thing to remember is that you must add the tags
to indicate the structure of the document (not how you want it to be presented); for example, which
part of the document is a heading, which parts are paragraphs, what belongs in a table, and so on.
Browsers such as Internet Explorer, Firefox, and Google Chrome all use this markup to help present
the text in a familiar fashion, similar to that of a word processor—main headings are bigger than the
text in paragraphs, there is space above and below each paragraph, and lists of bullet points have a
circle in front of them.
NOTE Although earlier versions of HTML enabled you to control the presentation
of a document—such as which typefaces and colors a document
should use—HTML markup is not supposed to be used to style the document;
that is the job of Cascading Style Sheets (CSS), which you meet in Chapter 7,
“Cascading Style Sheets.”
Now have a look at a simple web page (ch01_eg01.html). You don’t need any special programs to
write web pages; you can simply use a text editor such as Notepad on Windows or TextEdit on a
Mac and save your files with the .html or .htm file extension.
<html>
<head>
<title>Popular Websites: Google</title>
</head>
<body>
<h1>About Google</h1>
<p>Google is best known for its search engine, although
Google now offers a number of other services.</p>
<p>Google's mission is to organize the world's
information and make it universally accessible and
useful.</p>
<p>Its founders Larry Page and Sergey Brin started
Google at Stanford University.</p>
</body>
</html>
This may look a bit confusing at first, but it will all make sense soon. As you can see, there are several
sets of angle brackets with words or letters between them, such as <html>, <head>, </title>, and
</body>. These angle brackets and the words inside them are known as tags, and these are the markup
previously mentioned. Figure 1-1 illustrates what this page would look like in a web browser

No comments:

Post a Comment

SQL Server Services and Tools

  Microsoft provides both data management and business intelligence (BI) tools and services together with SQL Server. For data management, S...