Target
Target is another attribute of anchor tag. It specifies where the target URL should open. It takes up various values, which are:
_blank
The target file will open in a new window.
Example: |
<A href= "http://expertrating.com/" target=”_blank”> Mylink </A> |
Output: |
This hyperlink will take you to the site www.expertrating.com. It will open in a new window.
|
|
The following example creates a web page that links to the website www.expertrating.com.
Clicking on the link “link to expertrating” opens the website www.expertrating.com in a new window.
Example: |
< html> |
| < head> |
| < title> My list of jokes </ title> |
| </ head> |
| < body background = "myimage.jpg" text = “blue”> |
| < h1>This is my list of jokes </ h1> |
| < ul> |
| < li>Classic jokes </ li> |
| < li>Math jokes </ li> |
| < li>Food jokes</ li> |
| </ ul> <hr/> |
| < ol> |
| < li>Crazy jokes</ li> |
| < li>Ethnic jokes</ li> |
| < li>Golf jokes</ li> |
| </ ol> <hr/> |
| < A A href= "http://expertrating.com/" target= "_blank"> Link to expertrating </ A> |
|
| </body> |
| </html> |
| |
|
This is how the web page looks:
|