HTML Basics - Simple Example of Setting Hyperlink Style

HTML Basics - Simple Example of Setting Hyperlink Style

*** Example of setting the style of a hyperlink

a:link The state of a hyperlink before being clicked

a:visited The state after a hyperlink is clicked

a:hover Hovering over a hyperlink

a:active When clicking a hyperlink

There is an order in defining these states.

Code area:

XML/HTML CodeCopy content to clipboard
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >   
  2. < html   xmlns = "http://www.w3.org/1999/xhtml" >   
  3. < head >   
  4. < meta   http-equiv = "Content-Type"   content = "text/html; charset=utf-8"   />   
  5. < title > Untitled Document </ title >   
  6. < style   type = "text/css" >   
  7. a:link
  8. {
  9. color:#000;
  10. text-decoration:none;}
  11. a:visited
  12. {
  13. color:#000;
  14. text-decoration:none;}
  15. a:hover
  16. {
  17. color:#F00;
  18. text-decoration:underline;}
  19. a:active
  20. {
  21. color:#F90;
  22. text-decoration:underline;}
  23. </ style >   
  24. < link   href = "Untitled-1.css"   rel = "stylesheet"   type = "text/css"   />   
  25. </ head >   
  26.   
  27. < body >   
  28. <   href = "http://www.baidu.com/" > Baidu search </ a >   
  29. </ body >   
  30. </ html >   

Running display: When the mouse arrow is not on "Baidu", it displays black - when it is on, it displays red - when you click the "Baidu" link, it displays orange - after clicking, it displays black

The above article on HTML basics - a simple example of setting the style of hyperlinks is all I have to share with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM.

Original URL: http://www.cnblogs.com/H2921306656/archive/2016/07/10/5658752.html

<<:  Essential for front-end development: 12 browser compatibility testing tools recommended

>>:  Docker custom network container interconnection

Recommend

MySQL high concurrency method to generate unique order number

Preface After this blog post was published, some ...

Detailed explanation of Nginx reverse proxy example

1. Reverse proxy example 1 1. Achieve the effect ...

Detailed explanation of the solution to Ubuntu dual system stuck when starting

Solution to Ubuntu dual system stuck when startin...

Summary of the differences between Vue's watch, computed, and methods

Table of contents 1 Introduction 2 Basic usage 2....

Installation method of MySQL 5.7.18 decompressed version under Win7x64

Related reading: Solve the problem that the servi...

Summary of three methods of lazy loading lazyLoad using native JS

Table of contents Preface Method 1: High contrast...

Mysql date formatting and complex date range query

Table of contents Preface Query usage scenario ca...

Example of implementing skeleton screen with Vue

Table of contents Skeleton screen use Vue archite...

In-depth understanding of javascript class array

js array is probably familiar to everyone, becaus...

VMware Workstation 15 Pro Installation Guide (for Beginners)

01. VMware Workstation Pro 15 Download Download: ...

UTF-8 and GB2312 web encoding

Recently, many students have asked me about web p...

MySQL configuration SSL master-slave replication

MySQL5.6 How to create SSL files Official documen...

CSS3 overflow property explained

1. Overflow Overflow is overflow (container). Whe...

What we have to say about CSS absolute and relative

Written in the opening: Absolute said: "Rela...