2012-09-21 13 views
39

Duplicar posible:
How to remove the underline for anchors(links)?Extracción subrayan con el atributo href

En el siguiente código a continuación, el enlace se subrayó cuando se utiliza el atributo href.

<html> 
<body> 
<a href="xxx.html">goto this link</a> 
</body> 
</html> 

Quiero que el enlace se asocie con esa etiqueta, pero no se debe subrayar. ¿Cómo puedo hacer eso? Gracias de antemano por tu ayuda.

+1

hizo buscado en Google antes de publicar esta pregunta ..... si se hizo ninguna investigación antes de publicar u conseguirá resultado correcto en el primer enlace .... –

Respuesta

75

añaden un estilo con el atributo text-decoration:none;:

Hay un número de diferentes formas de hacer esto. estilo

en línea:

<a href="xxx.html" style="text-decoration:none;">goto this link</a> 

línea de estilo:

<html> 
<head> 
<style type="text/css"> 
    a { 
     text-decoration:none; 
    } 
</style> 
</head> 
<body> 
<a href="xxx.html">goto this link</a> 
</body> 
</html> 

hoja de estilo externa:

<html> 
<head> 
<link rel="Stylesheet" href="stylesheet.css" /> 
</head> 
<body> 
<a href="xxx.html">goto this link</a> 
</body> 
</html> 

stylesheet.css:

a { 
     text-decoration:none; 
    } 
+4

o goto this link, o Mejor aún ponga su CSS en otro archivo. – maru

Cuestiones relacionadas