Title-HTML.jpg
intro | tags | color | attributes | images | embedding | tables | links | | Exercises: 1.Homepage 2. Website
Need more help? Consult the w3schools.com tutorials

Tags

Tags are the commands used to control the appearance of your webpage.
A TAG is always enclosed in angle brackets
< >

A BASIC EMPTY WEBPAGE
There are four tags that you always use to start building a new webpage:
<HTML>
<HEAD>
<TITLE>Title Text Goes Here</TITLE>
</HEAD>
 
<BODY>
Body Text Goes Here
</BODY>
</HTML>

Notice that all of these particular tags come in pairs

Opening Tag
Closing Tag
Function
<HTML>
</HTML>
Declares your document as HTML code
<HEAD>
</HEAD>
Creates the "Head" area of your webpage - it won't be seen in the main browser window, but it can affect how your webpage works, and how search engines like Google will catalogue it
<TITLE>
</TITLE>
Creates the text in the "Title Bar" area of your Browser window
<BODY>
</BODY>
Defines the "BODY" area where the content of your webpage will go.

Think of the PAIRS of tags as "bookends" that modify everything you put in between them.

DO THIS:
Copy and paste the "basic empty webpage" tags into your notepad document.
Type the following text into the BODY AREA of your webpage:

HELLO WORLD!
This is my first webpage!
How does it look so far?
Save your document (index.htm) and refresh it in the browser. Does it appear the way you expected?

FORMATTING TAGS

Linebreaks and extra spaces are actually IGNORED by web browsers
You can "program in" linebreaks with the BREAK TAG
<BR>
Note, this is a tag that acts ALONE - it doesn't have to be "closed"
There is a similar tag


STYLE TAGS

Try these other tags to control the appearance of text in your webpage

BOLD UNDERLINE and ITALICIZE can be made with their respective tags:
<B>BOLD</B> <U>UNDERLINE</U> <i>ITALICIZE</I>


HEADLINES:

<H1>Largest Headline</H1>
 


FONT:

<FONT SIZE=4 COLOR="#FF6600">Yellowish Text</FONT>
FONT allows you to control the appearance of your text such as Size and Colour, if you add the appropriate "Attributes":
  • SIZE
  • COLOR
The MAXIMUM font size is 7, the minimum is 1
Colours are based on a 6 character hexidecimel code that represent the values of RED GREEN and BLUE (#RRGGBB)

CENTER:

<CENTER> My Wicked Headline <CENTER>
CENTER will (horizontally) align anything it encloses to the center of your webpage.