Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Style Sheets
Style sheets represent a major breakthrough for web
designers by giving them a wider range of possibilities to
improve the appearance of your pages. In scientific in that
the Web was conceived environments, people were more
concerned with the content of your pages for your
presentation. As the Web was discovered by a wider range
of people from different backgrounds, the limitations of
HTML became a source of continuing frustration and
authors were forced to overcome the stylistic limitations of
HTML. While the intentions have been good - to improve the
presentation of Web pages - the techniques to achieve this
have negative side effects. Among these techniques, which
work well for some people, sometimes, but not always and
for everyone, including:
The use of proprietary extensions to HTML
Converting text into images
Using Images to control the blank
The use of tables for organizing pages
Write programs instead of using HTML
These techniques significantly increase the complexity of Web pages,
offer limited flexibility, suffer from interoperability problems, and create
difficulties for people with disabilities.
Entre lneas
Hojas de estilo interna
Hojas de estilo externas
1. Entre lneas
Debemos usar esta forma cuando un nico estilo es aplicado a
un solo elemento.
Su uso est dado por el atributo style que se encuentra en casi
todas las etiquetas.
En este ejemplo aplicaremos un estilo(color rojo y un margen
izquierdo de 30 pixels) a la etiqueta <p>, la cual determina
que todo el contenido de la misma ser afectado.
Ejemplo
Cdigo
Resultado
Ejemplo
Cdigo
Resultado
<head>
<style type="text/css">
body {background-color:blue}
p {color:white}
</style>
</head>
<body>
<p>Fuentes blancas sobre fondo
azul</p>
</body>
En este ejemplo se muestra que la etiqueta <style> con su
atributo type define una hoja de estilo por medio del valor
text/css.
En este ejemplo podemos observar que le hemos aplicado
estilos a los siguientes elementos:
body : define el color de fondo de la pgina en azul.
p : define todas las fuentes de color blanco.