HTML_02_Links
Links
grammar
<a href="https:www.imdb.com">IMDB</a>
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>
2. Email Links
<a href="mailto:Jerry1321@gmail.com">Email Jerry</a>
3. Opening links in a new window
<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>
moyutime:本文仅是学习心得,观点仅供参考,祝愿读者学习途中快乐且不断有所收获。