HTML Basic Tags
HTML Basic Tags
<HTML>
These tags enclose the entire Web page document.
</HTML>
<HEAD>
These tags enclose the Head part of the document
</HEAD>
<TITLE>
These tags enclose the title of the document. This text appears in the title bar in
the browser and on the bookmark list if someone bookmarks your web page.
</TITLE>
Sample Structure of a Web Site
<HTML>
<HEAD>
<TITLE> Sample Web Page </TITLE>
</HEAD>
<BODY>
This is John Public's Webpage!
</BODY>
</HTML>
Header Tags
Example: text a
<p>text a</p>
<p>text b</p> text b
<br>text c
<br>text d text c
text d
Horizontal Rule
Tag Result
Web creators can also change the way text looks by using the <FONT> tag
Big Small
Unordered lists:
<UL>
<LI>Item One • Item One
<LI>Item Two • Item Two
<LI>Item Three • Item Three
<LI>Item Four
• Item Four
</UL>
start="xx“---This attribute lets you specify which number/letter will start the list
Lists -- Definition Lists
Definition Lists:
<DL> <!– Definition List -->
<DT>List Name One <!– Define terms/names -->
<DD>This is where information about List Name One
would go</DD>
</DT> <!– DD –define data -->
<DT>List Name Two
<DD>This is where information about List Name Two
would go</DD>
</DT>
</DL>
List Name One
This is where information about List Name One
would go
List Name Two
This is where information about List Name Two
would go
Example
<html>
<body>
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
</body>
</html>
Links
The anchor tag <A> is used to link one document to another or from one part of a document
to another part of the same document.
Basic Links:
<A HREF="http://www.stanford.edu/">Stanford University</A>
Inter-document Links:
<A HREF="#spot">Point to 'spot' in this document</A>
Email links:
<A HREF="mailto:[email protected]">Email [email protected]</A>
Graphics
<IMG SRC=“fish.gif">
Graphics attributes:
alt="text": insert a description of the graphic for those who are using browsers that
cannot
process images (e.g., page readers for the blind)
width="xx / xx%": width in pixels/percentage
height="xx / xx%": height in pixels/percentage
border="xx": pixel length of the border surrounding the image.
hspace="xx": places a buffer of space horizontally around the image
vspace="xx": places a buffer of space vertically around the image
Graphics (cont.)
<img src=“fish.gif" align="top">All about Fish