write an HTML code to display links as buttons ussing CSS styling? pls answer if u know??
Answers
Answer:
Links or hyperlinks are an essential part of a website. It allows visitors to navigate through the site. Therefore styling the links properly is an important aspect of building a user-friendly website.
See the tutorial on HTML links to learn more about links and how to create them.
A link has four different states — link, visited, active and hover. These four states of a link can be styled differently through using the following anchor pseudo-class selectors.
a:link — define styles for normal or unvisited links.
a:visited — define styles for links that the user has already visited.
a:hover — define styles for a link when the user place the mouse pointer over it.
a:active — define styles for links when they are being clicked.
You can specify any CSS property you'd like e.g. color, font, background, border, etc. to each of these selectors to customize the style of links, just like you do with the normal text.
ExampleTry this code »
a:link { /* unvisited link */
color: #ff0000;
text-decoration: none;
border-bottom: 1px solid;
}
a:visited { /* visited link */
color: #ff00ff;
}
a:hover { /* mouse over link */
color: #00ff00;
border-bottom: none;
}
a:active { /* active link */
color: #00ffff;
}a:link { /* unvisited link */
The order in which you are setting the style for different states of links is important, because what defines last takes precedence over the style rules defined earlier.