Web Development Course - Class #5 - CS Expert

Latest

Random Posts

Seo Services

Thursday, November 1, 2018

Web Development Course - Class #5



Link Tag
Links are created using the <a> element. Users can click on anything
between the opening <a> tag and the closing </a> tag. You specify
which page you want to link to using the href attribute.
<a href="http://www.csexpert.blogspot.com">CS Expert</a>
<a>
Links are created using the <a> element which has an attribute called href. The value of the the href is the address of the site where you want to go by click on that link.

Users can click on anything that appears between the opening <a> tag and the closing </a>

Tag.
Example:
<p>Computer Courses:
<ul>
<li><a href="http://www.w3school.com">
Web Development</a></li>
<li><a href="http://www.Bitspak.com">
Python Programming</a></li>
<li><a href="http://www.Conceptinstitute.com">
Asp.Net</a></li>
</ul>
</p>

Linking to other pages of same site:
<a>
There is no need to specify the domain name while linking the other pages of the same site.You can use a shorthand known as a relative URL.If all the pages of the site are in the same folder, then the value of the href attribute is just the name of the file.
Example:
<p>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about-us.html">About</a></li>
<li><a href="movies.html">Movies</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</p>




Email Links:
To create a link that starts up
the user's email program and
addresses an email to a specified
email address, you use the <a>
element. However, this time the
value of the href attribute starts
with mailto: and is followed by
the email address you want the
email to be sent to.

Example:

<a href="mailto:csexpert@example.org">Email CS Expert</a>
 


Opening Links on a new Window:
If you want to open the link by clicking on the new window then we use an attribute of “Target”and the value of this attribute will be “_blank”.
Example:
<a href="http://www.csexpert2k19.blogspot.com" target="_blank">
CS Expert</a> (opens in new window)


Video



No comments:

Post a Comment