Introduction to HTML

What is HTML?

HTML stands for Hypertext Markup Language and allows you, the author of the page, to tell the web browser how to display the page. Using a markup language means the page you create contains both what you want to display (the text) and the directions (html tags) for how to display it.

Remember: An HTML file is just a text file.
Although web pages often have pictures, or even sound and movies, HTML is plain text. This means you can create an HTML page in any simple text editor. We will be using a text editor called TextWrangler.

What are tags?

Remember: A tag starts with a < and ends with a >
An HTML tag is how you give the browser information about the text you are sending it. A tag always appears inside a < and a >.

Stand-alone Tags

Note: A lot of older HTML may not include a / in stand-alone tags, e.g. <br> or even omit some end tags entirely, e.g. </p>. However, the best web authors write code that is XHTML compliant. XHTML is a stricter version of HTML that makes certain types of automation easier (X is for Extensible).
Some tags stand alone on their own, such as <br />, and indicate to the browser something should happen right where the tag is in the text. For example, the <br /> tag adds a line break, which means starting a new line. The "/" indicates that this tag stands alone and does not have an end tag (see below).

Container Tags

However, most tags are container tags and have three parts: the start tag, the end tag and the text you put in between. For example, the <strong> tag might be used like this:

<strong>You should read this!</strong>

Remember: End tags begin with </
Notice that the end tag looks just like the start tag, only the first character after the < is a /. This is what tells the browser that this tag should end whatever the first tag began. Whatever the tag does is applied to the text in between the start tag and the end tag. The <strong> tag usually makes text appear bold, so the result of the line above is:
You should read this!

End of Overview