Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.63 MB, 11 trang )
Session 1
Introduction to HTML
Working with HTML Elements
Objectives:
At the end of this session, you will be able to:
Write simple HTML documents
Use Hyperlinks
Use <meta> tag
Use special characters in HTML
Use Basic Tags
Insert Images
The steps given in this session are detailed, comprehensive and carefully thought through. This has
been done so that the learning objectives are met and the understanding of the tool is complete.
Please follow the steps carefully.
In order to execute the programs follow the steps given below:
1. Create a folder BDWS under C:\Temp, then create a folder Session1 in BDWS and save all the
.html files in this folder only.
2. Invoke Textpad application by clicking on the “Start” button and then “Programs\Text Editor”.
3. Use Textpad to write all .html files.
4. Use Internet Explorer or Firefox to display all .html files.
Part I:
Do workshop in CD
Part II:
Example 1: An HTML code to illustrate an anchor tag
<html>
<head>
<title>First Linked Document</title>
My first paragraph
BayStack SNMP, Advanced, and SA 10Base-T Stackable Hubs from Bay
Networks offer simple, scable solutions for supporting small and growing
Ethernet networks......
Scalable from 12 to 260 Nodes Baystack 10BASE-T Hubs deliver a simple
and cost-effective method for starting and growing Ethernet networks......
The BayStack 10BASE-T Hubs deliver simple, scalable, plug-and play
solutions for small and growing Ethernet net-work environments.....
Technical Specifications for the BayStack 10BASE-T Hubs are shown in
Table 1.....
<code>If A > B Then <BR> A = A - 1</code>
<code>If A < B Then <BR> A = A + 1</code>
This page is refreshed after every 2 seconds
This page supports Unicode
You can use a DIV tag to align a block of content to the right.
This Is My 7 <sup>th</sup> Program Using HTML
H<sub>2</sub>O Is The Chemical Name For Water
*
*********
*********
*
*
*
*
*
*
*
*********
*********
*
*
*
*
*
*
*
*********
*********
</pre>
<s>This Text Will Appear With Strike Effect</s>
</body>
</html>
8
Figure 1.7: Output of Example 7
Example 8: To insert an image into HTML document
<html>
<head>
<title>Inserting Images</title>
</head>
<!--set background image of Web page-->
<body background="background.gif">Inserting Images
<hr>
<img src="fpt_aptech.jpg" border="1" alt="FPT Aptech" width="438" height="88">Create a link of an image
<a href="#"><img src="click.gif" alt="Click here"></a>
</body>
</html>
9
Figure 1.8: Output of Example 8
10
Part III: Try It Yourself
1. Write a web page that contains description of your family and also of your pets. Clicking the
link “Describe Family” should take you to the description of the family. Clicking the link
“Describe Pet” should take you to the description of your pet.
Hint: Use the anchor and paragraph elements.
2. Write the HTML statements that would give the following line on a web page.
For more information, please send an e-mail to me,
Hint: Put the following statement in the <BODY> section of the HTML file.
<a href="mailto:"></a>
5. Write HTML code to display the following text using superscripts.
The Value of 2 to the power of 3 is:
23 = 8
6. Write HTML code to display the following text using subscripts.
The Value of Log to the base 10 is:
Log10 = 1
7. Write HTML code to insert an image into the web page. Align the image with the description of
the image.
8. Do practical assignments in CD.
11