Marco con HTML: cómo funciona
Para hacer que los medios en su sitio web sean más atractivos, puede usar el código HTML para dibujar un marco a su alrededor. En este consejo práctico, le mostramos cómo funciona esto y qué ventajas ofrecen las hojas de estilo en cascada (CSS) al definir un marco.
Codificación HTML: dibuje marcos alrededor de imágenes y otros medios
Por defecto, cada imagen tiene un marco de un píxel de ancho. Sin embargo, esto solo es visible si la imagen se usa como un hipervínculo. Con el atributo "borde" puede definir individualmente el grosor del marco.
- En HTML, el código para un marco negro de diez píxeles se parece a esto:
- Este marco se aplica a los cuatro lados del objeto.
- Alternativamente, puede usar un programa de edición de imágenes como Gimp para dibujar el marco alrededor de su imagen.
- Sin embargo, tenga en cuenta que esto hará que la imagen sea más grande y que el visitante de su sitio web tarde más en descargar la imagen.
Defina el marco en el documento HTML con CSS
Puede definir el marco, por ejemplo, un cuadro alrededor de un texto, con hojas de estilo en cascada incluso con mayor precisión.
- Otro consejo práctico le dice cómo integrar un archivo CSS en su sitio web.
- En este documento CSS, puede establecer el color y el grosor del marco de manera diferente para las cuatro páginas:
- border-bottom: # 999 - Establece el color para el marco inferior. Aquí también puede usar "border-top", "border-right" o "border-left".
- ancho de borde: 0 0 delgado delgado: especifica el grosor de la línea. Esto se hace en sentido horario. Aquí esto significa que no se pueden ver líneas en la parte superior y derecha, mientras que se ha definido una línea delgada en la parte inferior e izquierda.
- estilo de borde: ninguno ninguno groove groove: define el marco decorativo para su imagen o cuadro. El estilo "groove" crea un efecto 3D.
Su página de inicio vive naturalmente de su presencia en la red. En el próximo artículo, leerá los mejores consejos para mejorar su clasificación en Google.