Basic HTML Tutorial

Category: HTML
Reviewed by: miketogle   
Reviewed on: Oct 18 2003

HTML Defined

Hyper Text Markup Language, or HTML, is defined as the popular language that allows people to create Web pages. In simple terms, HTML is responsible for marking up textual content and images for the different web browsers to create a structure and/or format to make it more presentable.

Who made HTML? Most of the languages that are critical to Web design and development are recommendations of an important body called the World Wide Web Consortium (W3C). When I say languages, I'm referring to HTML, XML, XHTML, CSS, and several others. Pretty much every bare-code web-based language being used comes from the W3C, making it an essential body in the internet.

Parts of an HTML

Here's an example of the basic code for HTML:

    <title>This is the title</title>
    This is the Body

All the HTML terms used, such as <head>, are enclosed in angle brackets, < and >, and these are called tags. One simple example of how this works is the <html> tag. I use it to indicate that the Web page is written in HTML. By standards, every tag has to have a starting or opening tag and an ending or closing tag. The closing tag is always the same as the opening tag but it starts with a slash '/' right after the opening angle bracket, <. Collectively, each starting and ending tag along with everything between them corresponds to an HTML element.

Let's move on to the basic sections of a Web page, and these are the head and body sections that are represented by the <head> and <body> tags respectively. The head section usually includes information about how the Web page should look like, and elements like title, stylesheets, javascript, meta, etc are placed between it. The <title> tag is placed within the head section as it gives the page a name via the title bar. The body section includes the actual material that you want to display. In other words, it contains the actual content for which you created the Web page for.

Tag Cases, Attributes and Saving

Although browsers are not case-sensitive, which means that a <p> is the same as <P>, we will be using lowercase tags in most of the articles. This is due to the recommendations by W3C to use lowercase tags, and for convenience when you try learning XHTML. XHTML demands the use of lowercase tags and quite a lot more, but we will not discuss that in THIS article.

Tag attributes provide additional information to the different HTML elements on a web page. Specifically, they are either properties or events of an HTML element and they usually come in pairs. The first of the pair being the name of the attribute, and the second being the value. Attributes are appended to the starting tag of an HTML element; after the tag name. An example of this would be the bgcolor attribute of the body tag:

<body bgcolor="blue"> 

After setting up your webpage, you have to save it as either .htm or .html for it to be displayed on a web browser. I believe the htm format was a product of the old three-letter file extensions. Most browsers would have no problems in parsing web pages in html format, and it would be advisable to use the latter.