รูปแบบ
<a href="ไฟล์ที่จะทำการเชื่อมโยงที่มีนามสกุล .html หรือ .htm">ข้อความ</a>
ตัวอย่าง
<html> <head>
<title> การเชื่อมโยง</title> </head>
<body>
<h1><center><font size="3" color="hotpink">
CREATING LINKS
</font></center></h1>
<br /><br /><p>
แสดงการสร้าง Link
<a href = "ex2_8.html">คลิกที่นี่เพื่อแสดง ex2_8.html</a></p>
</body>
</html>
<title> การเชื่อมโยง</title> </head>
<body>
<h1><center><font size="3" color="hotpink">
CREATING LINKS
</font></center></h1>
<br /><br /><p>
แสดงการสร้าง Link
<a href = "ex2_8.html">คลิกที่นี่เพื่อแสดง ex2_8.html</a></p>
</body>
</html>
การเชื่อมโยงข้อมูลภายในแฟ้มเอกสาร
<html>
<head><title>Using Links</title> </head>
<body>
<a href = "#Internet">Internet</a>
<br /> <br />
<a href = "#HTML">Introduction to HTML</a>
<br /> <br />
<a href = "#XHTML">Introduction to XHTML</a>
<br /> <br />
<a name="Internet">Internet</a>
<br />
<head><title>Using Links</title> </head>
<body>
<a href = "#Internet">Internet</a>
<br /> <br />
<a href = "#HTML">Introduction to HTML</a>
<br /> <br />
<a href = "#XHTML">Introduction to XHTML</a>
<br /> <br />
<a name="Internet">Internet</a>
<br />
การเชื่อมโยงไปต่างแฟ้มเอกสารโดยกำหนดจุดไปด้วย
<html> <head>
<title>Main document</title>
</head>
<body>
<a href = "ex2_9.html#Internet">Internet</a><br />
<a href = "ex2_9.html#HTML ">Introduction to HTML</a>
<br />
<a href = "ex2_9.html#Consistency">Unity and Variety</a>
</body>
</html>
<title>Main document</title>
</head>
<body>
<a href = "ex2_9.html#Internet">Internet</a><br />
<a href = "ex2_9.html#HTML ">Introduction to HTML</a>
<br />
<a href = "ex2_9.html#Consistency">Unity and Variety</a>
</body>
</html>
การเชื่อมโยงนอกเว็บไซต์
<a href="http://URLที่ต้องการจะเชื่อมโยงไป">ข้อความ</a>
ตัวอย่าง
<html>
<head><title>Links to Others Website</title></head>
<body>
<h1>คลิ๊กเพื่อ ลิงค์ไปยัง สนุก</h1>
<a href="http://www.sanook.com">sanook.com</a>
</body>
</html>
<head><title>Links to Others Website</title></head>
<body>
<h1>คลิ๊กเพื่อ ลิงค์ไปยัง สนุก</h1>
<a href="http://www.sanook.com">sanook.com</a>
</body>
</html>
0 ความคิดเห็น:
แสดงความคิดเห็น