0% found this document useful (0 votes)
2K views6 pages

HTML Code for Creating Hyperlinks

The document contains HTML code examples for creating hyperlinks, unordered lists of hyperlinks, image hyperlinks, and forms. The code examples demonstrate how to: 1. Create hyperlinks to external websites that open in a new window 2. Generate an unordered list of internal page hyperlinks 3. Display images as hyperlinks to external websites and email 4. Build a basic form with text fields and a textarea for comments 5. Display the same form using HTML tables for layout

Uploaded by

Qureshi01
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views6 pages

HTML Code for Creating Hyperlinks

The document contains HTML code examples for creating hyperlinks, unordered lists of hyperlinks, image hyperlinks, and forms. The code examples demonstrate how to: 1. Create hyperlinks to external websites that open in a new window 2. Generate an unordered list of internal page hyperlinks 3. Display images as hyperlinks to external websites and email 4. Build a basic form with text fields and a textarea for comments 5. Display the same form using HTML tables for layout

Uploaded by

Qureshi01
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

WEB DESIGNING Hyperlinks, Frames & Forms

4.1 Write HTML code that displays three hyperlinks to different websites. The
websites should open in a new window when the user clicks on the hyperlinks.

<HTML>

<BODY>

<A HREF="[Link] TARGET="_blank">Hotmail</A>


<P>
<A HREF="[Link] TARGET="_blank">Yahoo</A>
<P>
<A HREF="[Link] TARGET="_blank">Google</A>

</BODY>

</HTML>

1
WEB DESIGNING Hyperlinks, Frames & Forms

4.2 Write HTML code that creates an unordered list containing hyperlinks to five
web pages.

<HTML>

<BODY>

<UL>
<LI>
<A HREF="[Link]">Home</A>
<p>
<LI>
<A HREF="[Link]">Contact Us</A>
<P>
<LI>
<A HREF="[Link]">Programs Detail</A>
<p>
<LI>
<A HREF="[Link]">Books</A>
<P>
<LI>
<A HREF="[Link]">FAQs</A>
</UL>

</BODY>

</HTML>

2
WEB DESIGNING Hyperlinks, Frames & Forms

4.3 Write HTML code that displays three images as hyperlinks. Two image
hyperlinks should refer to any two websites and the third image should be an email
hyperlink.

<HTML>

<BODY>

<A HREF="[Link]
<IMG SRC="[Link]">
<BR>Hotmail</A>
<P>
<A HREF="[Link]
<IMG SRC="[Link]">
<BR>Yahoo</A>
<P>
<A HREF="[Link]
<IMG SRC="[Link]">
<BR>Email</A>

</BODY>

</HTML>

3
WEB DESIGNING Hyperlinks, Frames & Forms

4.1 Write HTML code that displays the following form:

<HTML>

<BODY>

<H1>A Guest Book Form</H1>


<FORM NAME="Form" ALIGN="center">
First Name: <INPUT TYPE="text" NAME="FName">
Last Name: <INPUT TYPE="text" NAME="LName">
<P>
Email: <INPUT TYPE="text" NAME="Email">
Year of Graduation: <INPUT TYPE="text" NAME="YOG">
<p>
College: <INPUT TYPE="text" NAME="CName">
Major: <INPUT TYPE="text" NAME="Msub">
<p>Comments<BR>
<TEXTAREA COLS="25" ROWS="2">
</TEXTAREA>
<p>
Would you like to share your comments?
<INPUT TYPE="Radio" NAME="comments" VALUE="y" checked>Yes
<INPUT TYPE="Radio" NAME="comments" VALUE="N">No
<p>
<INPUT TYPE="submit" NAME="submit" VALUE="Send Entry">
<INPUT TYPE="reset" NAME="rest" VALUE="Clear Form">

</BODY>

</HTML>

4
WEB DESIGNING Hyperlinks, Frames & Forms

5.2 Write HTML code that displays the form in table:s

<HTML>

<BODY>

<H2>Please fill this survey form</H2>


<FORM NAME="Form" ALIGN="center" >
<TABLE BORDER="2" WIDTH="70">
<TR>
<TD>First Name: <TD><INPUT TYPE="text" NAME="FName">
<TD>MI: <TD><INPUT TYPE="text" NAME="MI">
<TD>Last Name: <TD><INPUT TYPE="text" NAME="LName">
</TR>
<TR>
<TD>City: <TD><INPUT TYPE="text" NAME="CName">
<TD>State: <TD><INPUT TYPE="text" NAME="State">
<TD>Zip Code: <TD><INPUT TYPE="text" NAME="ZCode">
</TR>
<TR>
<TD COLSPAN="6">Choose a sport:
</TR>
<TR>
<TD COLSPAN="6">
Basketball<INPUT TYPE="checkbox" NAME="basketball" checked>
Football<INPUT TYPE="checkbox" NAME="Football">
Hockey<INPUT TYPE="checkbox" NAME="Hockey">
</TR>
<TR>
<TD COLSPAN="6">Choose a year:
</TR>
<TR>
<TD COLSPAN="6">
Freshman: <INPUT TYPE="radio" NAME="Fman" checked>
Sophomore: <INPUT TYPE="radio" NAME="Smore">
Junior: <INPUT TYPE="radio" NAME="junior">
Senior: <INPUT TYPE="radio" NAME="senior">
</TR>
<TR>
<TD COLSPAN="6">Choose your favorite fast food:
</TR>
<TR>
<TD COLSPAN="6">
<SELECT NAME="food" MULTIPLE>
<OPTION VALUE="Chips">Chips

5
WEB DESIGNING Hyperlinks, Frames & Forms

<OPTION VALUE="Pizza">Pizza
<OPTION VALUE="Nachos">Nachos
</TR>
<TR>
<TD><INPUT TYPE="submit" NAME="submit" VALUE="Send It">
<TD COLSPAN="5">
<INPUT TYPE="reset" NAME="reset" VALUE="Clear It">
</TR>
</TABLE>

</BODY>

</HTML>

You might also like