html超鏈接另一個(gè)html頁面的方法:在一個(gè)html文檔中使用“<a>”標(biāo)簽定義一個(gè)可以跳轉(zhuǎn)到另一個(gè)HTML頁面的超鏈接即可,具體語法格式“<a href="html頁面的具體URL">另一個(gè)html頁面</a>”。
本教程操作環(huán)境:windows7系統(tǒng)、HTML5版、Dell G3電腦。
html超鏈接另一個(gè)html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <a href="2.html">跳轉(zhuǎn)到另一個(gè)html頁面</a> </body> </html>
效果圖:
HTML <a> 標(biāo)簽
<a> 標(biāo)簽定義超鏈接,用于從一個(gè)頁面鏈接到另一個(gè)頁面。
<a> 元素最重要的屬性是 href 屬性,它指定鏈接的目標(biāo)?!就扑]教程:《html視頻教程》】
基本語法:
<a href="URL">文本</a>
a標(biāo)簽的屬性:
屬性 | 值 | 描述 |
---|---|---|
charset | char_encoding | HTML5 不支持。規(guī)定目標(biāo) URL 的字符編碼。 |
coords | coordinates | HTML5 不支持。規(guī)定鏈接的坐標(biāo)。 |
download | filename | 指定下載鏈接 |
href | URL | 規(guī)定鏈接的目標(biāo) URL。 |
hreflang | language_code | 規(guī)定目標(biāo) URL 的基準(zhǔn)語言。僅在 href 屬性存在時(shí)使用。 |
media | media_query | 規(guī)定目標(biāo) URL 的媒介類型。默認(rèn)值:all。僅在 href 屬性存在時(shí)使用。 |
name | section_name | HTML5 不支持。規(guī)定錨的名稱。 |
rel | alternate author bookmark help license next nofollow noreferrer prefetch prev search tag |
規(guī)定當(dāng)前文檔與目標(biāo) URL 之間的關(guān)系。僅在 href 屬性存在時(shí)使用。 |
rev | text | HTML5 不支持。規(guī)定目標(biāo) URL 與當(dāng)前文檔之間的關(guān)系。 |
shape | default rect circle poly |
HTML5 不支持。規(guī)定鏈接的形狀。 |
target | _blank _parent _self _top framename |
規(guī)定在何處打開目標(biāo) URL。僅在 href 屬性存在時(shí)使用。
|
type | MIME_type | 規(guī)定目標(biāo) URL 的 MIME 類型。僅在 href 屬性存在時(shí)使用。 注:MIME = Multipurpose Internet Mail Extensions。 |