You are here

-Introducing HTML-

Are you ready to be an HTML spy? While HTML seems like the a minor language, web sites cannot be produced without it. If you want to be a spy of the web development world, or if you just want to produce a basic page, you need to know the basics of HTML. This HTML guide will take you from the basics of HTML through to much more complex syntax, including CSS, JavaScript and HTML5.

What is HTML?

  • Hyperlinks are the links that when clicked, bring you to a new page. You could not have come here without knowing this much.
  • Hyper-Text is text with those links embedded in them.
  • A Markup Language us a simple language that uses tags, or code words, to tell the browser what to do with the text
  • Other examples of markup languages include GML, XML, and LaTeX. Each of these markup languages have a different use, but share similarities in their structure with HTML.

Tags, become an HTML spy

If you want to be a spy, you sometimes need to learn code words. If you want to be a spy for HTML, you need to learn the HTML code words. These code words are called tags. Tags make up HTML.

  • They are put between angle brackets (<>).
  • Each code word says something about the page, or the text.
  • Each tag should have an open tag and a close tag.
    • <tag> is an opening tag for the fictitious tag tag.
    • </tag> is the fictitious closing tag
    • <aside>sometimes geeks will use pseudo-HTML to let you know how they mean something, as I am doing here. </aside>
  • Some tags can also have an attribute, value pair.

attribute, value pairs

While the tags are the nouns, attributes are adjectives. Depending on how they are set, different things happen to the area that tag effects. For example if we use the <font> tag and use the attribute color with the value of red the tag would like like this:

<font color="red">This is red text</font>

and it will display this:

This is red text

HTML versions

There are several different versions of HTML. Below are the most important highlights.

  • In January 1997 HTML 3.2 was published. This was the first generally used version of HTML.
  • In December 1997 HTML 4.0 was published, enhancing 3.2.
  • 4.0 was updated into 4.01 and was the basis for XHTML.
    • There were three variations of HTML 4: strict, transitional and frameset.
    • Strict follows the coding rules for its version and does not offer backwards compatibility.
    • Transitional is a little sloppier and allows the programmer to use code from earlier versions.
    • Frameset allowed a programmer to make "frames" on the page. We will talk more about frames, and the better ways to do the same thing, in later lessons.
  • In October 2014, after years of discussion, HTML5 was released.

What to use?

In general, it is best practice to use strict when you can. Strict follows the rules more closely and therefor is going to be more likely to look the same across browsers and continue to work in later browsers that may not listen for deprecated tags.

Don't use frameset. Frames make your site look immature and sloppy and people don't like frames.

Use the most recent code base. While using HTML 3.2 is still allowed, it is best to use the most current version. This tutorial will reference deprecated tags, but will be focused around being an HTML5 spy.

um, what is deprecated?

When a tag, attribute or value is no longer valid, it is considered deprecated. For example the <font> tag (used above) was valid in HTML 4, but has been deprecated in HTML5, in favor of using CSS to change the font.

Should I use a program to code for me?

There are programs that will do much of the work for you, but none of them can replace knowing how to code. Those programs are great for those that want a site up, but have no desire to customize. They are great for those that don't care if their pages pass validation. If you want to code like a professional, or just want to make simple pages, but want to be able to customize more than the WYSIWYG (What You See Is What You Get) programs, then you must learn at least the basics of HTML. Continue with this guide and you will be taken from the most basic to some very complex.

Some people will use WYSIWYG editors to start, then clean up the code afterwards. I find this cumbersome and think it is easier to code by hand, but this is a preference. Either way you prefer works. If you choose to use a WYSIWYG first, you will need to know HTML in order to fix what the WYSIWYG incorrectly thinks you want to do.