Cuestión muy sencilla sobre html y css, ¡ayuda!
Publicado por leish (7 intervenciones) el 02/07/2006 21:22:31
¡Espero que puedan ayudarme, sólo necesito una pequeña ayuda...
Resulta que tengo 2 archivos en una carpeta: texto.html y estilo.css
En texto.html tengo un texto en formatos de etiquetas html que son <h2> y <a> El código sería
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estilo.css" rel="stylesheet" type="text/css">
</head>
<body>
<h2>Entrar a Google </h2>
<a href="http://www.google.es" target="_blank">Google</a>
</body>
</html>
Y en estilo.css el siguiente código:
h2 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: xx-large;
color: #FF0000;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: small;
color: #00CC00;
background-color: #66FF00;
}
Sin embargo no consigo lo que quisiera, que los textos que fuera poniendo entre <h2> o <a> adoptaran las propiedades que he puesto en el .css ¿qué puedo hacer? Rolling Eyes ¡muchas gracias!
Resulta que tengo 2 archivos en una carpeta: texto.html y estilo.css
En texto.html tengo un texto en formatos de etiquetas html que son <h2> y <a> El código sería
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estilo.css" rel="stylesheet" type="text/css">
</head>
<body>
<h2>Entrar a Google </h2>
<a href="http://www.google.es" target="_blank">Google</a>
</body>
</html>
Y en estilo.css el siguiente código:
h2 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: xx-large;
color: #FF0000;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: small;
color: #00CC00;
background-color: #66FF00;
}
Sin embargo no consigo lo que quisiera, que los textos que fuera poniendo entre <h2> o <a> adoptaran las propiedades que he puesto en el .css ¿qué puedo hacer? Rolling Eyes ¡muchas gracias!
Valora esta pregunta


0