Sharp Tutorial
CSS in Links

Python

Java

C

C++

HTML/CSS

Java Script

PHP

SQL

C Programs

HTML

  • HTML Home
  • Introduction
  • HTML Element
  • Commonly used tags
  • Hyperlinks
  • Images in HTML
  • Div in HTML
  • Html Forms
  • Html Tables
  • Miscellaneous Topics

CSS

  • Introduction to CSS
  • How to apply CSS
  • CSS Selectors
  • Border in CSS
  • Text Formatting in CSS
  • Font Properties
  • Margin in CSS
  • CSS in List
  • CSS in Link
  • CSS Animation
  • CSS Effects
  • CSS Pagination
  • CSS Media Query

Java Script

  • Java Script Home
  • Introduction to Java Script
  • Variable in Java Script
  • Operators in Java Script
  • If-Else in Java Script
  • Loops in Java Script
  • Array in Java Script
  • Function in Java Script
  • Objects in Java Script
  • Java Script DOM

CSS in Link

Links can be styled depending on the state they are in:

  • a:link -: normal or unvisited
  • a:visited -: a link the user has visited
  • a:hover -: a link when user moves over it
  • a:active -: a link the moment it is clicked

<!DOCTYPE html>
<html>
<head>
<style>
/* unvisited link */
a:link {
color: red;
}

/* visited link */
a:visited {
color: green;
}

/* mouse over link */
a:hover {
color: hotpink;
}

/* selected link */
a:active {
color: blue;
}
</style>
</head>
<body>

<h2>CSS Links</h2>
<p><b><a href=“https://www.sharptutorial.com/” target=“_blank”>This is a link</a></b></p>
</body>
</html>

The output of the above command is given below :

Enquiry about Course

Ask your Question

Click Here

Sharp (2) Tutorials

Video/ C Introduction

Watch video in full size

Video tutorial

Follow by Email
Facebook
Facebook
fb-share-icon
YouTube
Copyright © Sharp Tutorial
Build with WordPress
Wordpress Social Share Plugin powered by Ultimatelysocial
Sharp Tutorial