| Free tutorials for Java, Eclipse and Web programming |
Version 1.3
Copyright © 2008 - 2010
26.06.2010 - 26.06.2010
| Revision History | ||
|---|---|---|
| Revision 0.1 | 12.04.2008 | Lars Vogel |
| Created | ||
| Revision 0.2 - 1.2 | 12.06.2008 - 26.06.2010 | Lars Vogel |
| bug fixed and enhancements | ||
Table of Contents
HTML (Hypertext Markup Language) is a standard to describe the content of webpages. HTML pages are text files which typically end with the ".html" extension. HTML is a so called "markup language".
The current version of HTML is HTML5. This version is still work in process but is already widely adapted by the browser vendors. I will therefore describe HTML5 syntax in this article.
Use a simple text editor, e.g. Notepad under Windows and save the following text as "page1.html". Do not use a editor as Winword as this editor saves additional information in the file it saves. Create the following text.
<!DOCTYPE html> <html> <head> <title>An HTML5 Document</title> </head> <body> <h1>Your first HTML5 page</h1> <p>This is a <a href="http://www.vogella.de">link</a> to another webpage</p> <!-- this is a comment --> </body> </html>
Open this page in a browser, e.g. by double-clicking on your page. The result should look like the following.

As you see in HTML you describe the structure of webpages in pure text — by defining text as headings, paragraphs, lists, etc. A tag is a text surrounded by angle brackets. Tags usually have a beginning and and end and contain other text between the start and end tag. The normal content of the webpage is placed between the <body> </body> tags, the <head> </head> tag contains general information about the webpage.
HTML5 introduced several new ways of classifying content of the webpage, e.g. <nav> </nav> for the navigation part of the page, <article> </article> to represent an independent article, <aside> </aside> to represent a sidebar with related information. <footer> </footer> for a footer in the HTML page and <address> </address> for the contact information of the author.