What is HTML?
HTML stands for HyperText Markup Language. HTML is composed of tags that instruct browsers on displaying text and images, playing sound files, etc.
Basic Rules
- All tags have an opening and closing tag (e.g., <p> and </p> for paragraph tags). Tags that seem only to have an opening tag (e.g., <br>) should be written as a combination opening/closing tag: <br /> (note that there is a space between the br and the /).
- All tags should be written in lowercase.
- Attributes should be enclosed in quotation marks (e.g., <td colspan="2">, NOT <td colspan=2>).
- Tags should be nested:
- <p><strong>An example of correct nesting.</strong></p>
- <p><strong>An example of incorrect nesting.</p></strong>.
Some Basic Tags
<a href="[url]"> a href tag: a stands for anchor; href stands for hypertext reference. This is the tag used to make links. Place <a href="[url]"> and </a> around some text, and that text will become a link to whatever url you've put between the quotation marks that follow the a href=.
<body> body tag: place around the content of an html document; determines what displays in the main portion of the browser window.
<br /> break tag: breaks the text to the next line without adding a space between lines.
<em> emphasis tag: usually displays text between <em> and </em> in italics.
<head> head tag: place around the heading portion of an html document; contains title information and other "metadocument" stuff.
<h1>, <h2>, <h3>, etc. heading tags: place around headings; <h1> is more important (and usually displays in larger font) than <h2>, etc.
<html> html tag: place around an html document; what is between <html> and </html> is defined as an html document.
<p> paragraph tag: place around a paragraph of text; creates space above and below the text that <p> and </p> surrounds.
<strong> strong tag: usually displays text between <strong> and </strong> in bold.
<title> title tag: place around the title of an html document; determines what displays in the title bar of the browser.
An example:
example1.html
<html>
<head>
<title>HTML Example</title>
</head>
<body>
<h1>This is an H1 header</h1>
<p>This is a paragraph.</p>
<p><strong>This is bold text.</strong></p>
<p><em>This is italicized or emphasized text.</em></p>
<p><a href="http://staffweb.library.vanderbilt.edu/education/html/>This is a link to the main page of HTML: A Brief Introduction.</a></p>
</body>
</html>
Further Resources
Raggett, Dave. "Getting Started with HTML." World Wide Web Consortium. Last updated May 24, 2005. Online. Available http://www.w3.org/MarkUp/Guide/.
"Authoring: HTML Basics." Webmonkey. Online. Available http://hotwired.lycos.com/webmonkey/authoring/html_basics/.
Created by Chris Benda
