HTML_02_Links

grammar

<a href="https:www.imdb.com">IMDB</a>

IMDB

1. Directory Structure

Relative URLs

<a href="www.examplearts.com/index.html">home page</a>
<a href="www.examplearts.com/images/logo.gif">Path to the logo</a>
<a href="www.examplearts.com/movies/dvd/index.html">index page(DVD)</a>
<a href="mailto:Jerry1321@gmail.com">Email Jerry</a>

Email Jerry

<a href="https:www.imdb.com" target="_blank">Interent Movie Database (open in a new window)</a>

Interent Movie Database (open in a new window)

4. Linking to a specific part of the same page

id is unique with letter or underscore.

<h1 id="top">Top</h1>
</br>
</br>
</br>
</br>
</br>
<a href="#top">Scroll back to top</a>

Top






Scroll back to top

5. Linking to a specific part of another page

href should contain the address for another page (either an absolute URL or a relative URL)

<a href="https://www.htmlandcssbook.com/#bottom">go to the bottom of another page</a>

go to the bottom of another page

posted on 2023-02-13 15:06  摸鱼time  阅读(9)  评论(0编辑  收藏  举报