Creating Internal Hyperlinks - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:a

Introduction

You can create hyperlinks that bring another element into view in the browser window.

You do this using the CSS-style ID selector, #<id>.

If the element isn't already visible on the screen, the browser will scroll the document so that it is.

If the browser can't find an element with the desired id attribute value, it will search again, looking for a name attribute that matches the target.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
   </head> 
   <body>
       I like <!--from   w w  w . j a  v a2  s  .  c o m-->
      <a href="http://java2s.com/">CSS</a>
       and 
      <a href="http://java2s.com/">HTML</a>
      . You can 
      <a href="#app">here</a>
      . 
      <p id="app"> Here. </p>  
   </body>
</html>

Related Tutorials