The majority of the content for this section has been borrowed from the w3schools.com web site. This web site is an excellent resource for learning everything that you wanted to know about writing standards-compliant, cross-browser compatible HTML. I have included here the highlights that are most pertenant to what you will be doing, but you should feel free to visit the sourse site for a more in-depth look at http://www.w3schools.com/html/.
What is HTML?
- HTML is a language for describing web pages.
- HTML stands for Hyper Text Markup Language
- HTML is not a programming language, it is a markup language
- A markup language is a set of markup tags
- HTML uses markup tags to describe web pages
HTML Tags
- HTML markup tags are usually called HTML tags
- HTML tags are keywords surrounded by angle brackets like <html>
- HTML tags normally come in pairs like <b> and </b>
- The first tag in a pair is the start tag, the second tag is the end tag
- Start and end tags are also called opening tags and closing tags.
HTML Line Breaks
Use the <br /> tag if you want a line break (a new line) without starting a new paragraph:
Example <br /> This is <br />a para<br />graph with line breaks
The <br /> tag is an empty tag. It has no end tag like </br>.
HTML Formatting Tags
HTML uses tags like <b> and <i> for formatting output, like bold or italic text.
These HTML tags are called formatting tags. Tag Description <b> Defines bold text <i> Defines italic text <sub> Defines subscripted text <sup> Defines superscripted text <u> Defines underlined text
Example
This is a paragraph with <b>bold</b> and <i>italicized</i> words in it.
HTML Links
A link is the "address" to a document (or a resource) on the web.
Link syntax:
<a href="url">Link text</a>
The start tag contains attributes about the link.
The element content (Link text) defines the part to be displayed.
Note: The element content don't have to be a text. You can link from an image or any other HTML element.
-
The href Attribute
The href attribute defines the link "address".
This <a> element defines a link to W3Schools:
<a href="http://www.w3schools.com/">Visit W3Schools!</a> -
The target Attribute
The target attribute defines where the linked document will be opened.
The code below will open the w3schools web site in a new browser window:
Example
<a href=http://www.w3schools.com/ target="_blank">Visit W3Schools!</a>
