SpeakComputers.com
Home
Software
Electronics
Desktop Computers
Laptops
Games
Handheld Devices
Mobile Phones
Cameras
Camcorders
Printers
Books
Software Downloads 2012 Software Mac Software Security Student Editions Windows 7 Office 2010
Fundamentos de HTML.
Formato del documento HTML
Tags HTML
Tags Atributos - Propiedades
Enlaces HTML
Tablas HTML
Puntos – Enumeración HTML
Imágenes HTML
Formatear Texto HTML
Tipos de letra HTML
Elegir el elemento correcto
Meta Tags
Estilización HTML.
Elemento style HTML
Hojas de Estilo Externas
Tags atributo class HTML
HTML Elementos.
Elementos HTML
Elemento a
Elemento acronym
HTML Elemento address
Elemento area
Elemento b
Elemento bdo
Elemento big
Elemento blockquote
Elemento body
Elemento button
Elemento br
Elemento col
Elemento colgroup
Element comment
Elemento dd
Elemento del
Elemento dfn
Elemento div
Elemento dl
Elemento dt
Elemento em
Elemento fieldset
Elemento font
Elemento form
Elemento frame
Elemento frameset
Elemento head
Los elementos h1 al h6
Elemento hr
Elemento html
Elemento i
Elemento iframe
Elemento img
Elemento input
Elemento ins
Elemento kdb
Elemento label
Elemento legend
Elemento dd
Elemento del
Elemento dfn
Elemento div
Elemento dl
Elemento dt
Elemento em
Elemento fieldset
Elemento font
Elemento form
Elemento frame
Elemento frameset
Elemento head
Los elementos h1 al h6
Elemento hr
Elemento html
Elemento i
Elemento iframe
Elemento img
Elemento input
Elemento ins
Elemento kdb
Elemento label
Elemento legend
Elemento li
Elemento link
Elemento menu
Elemento meta
Elemento noframes
Elemento object
Elemento ol
Elemento optgroup
Elemento option
Elemento p
Elemento param
Elemento pre
Elemento small
Elemento span
Elemento strong
Elemento style
Elemento table
Elemento tbody
Elemento td
Elemento textarea
Elemento title
Elemento tr
Elemento u
Relacionado.
Estadísticas del Sitio Web
Cuadro de Colores HTML
ASP.NET C# VB.NET C++ .NET Infragistics DevComponents

HTML, Elegir el elemento correcto

Como con otros lenguajes de programación, con HTML hay muchas maneras o métodos diferentes de conseguir su objetivo. No hay una sola forma correcta de hacer algo. Hay sin embargo maneras incorrectas de hacer algo. Elegir que elemento es el más apropiado para sus necesidades es por supuesto importante, pero habrá veces en las que pueda usar cualquiera de los 2 o 3 elementos seleccionados.

Vamos a hacer un ejemplo.


<
html>
<
head>
<
title>Tabla Flotante</title>
</
head>
<
body>
<
table style="float: right" border="0" cellspacing="0" cellpadding="0" width=100>
<
tr>
<
td valign="top" align="center">
<
img src="images/STUCK.gif" border=0 />
<
br />
<
p align="left">Algun texto va aqui.</p>
</
td>
</
tr>
</
table>
<
h1>Tabla Flotante</h1>
Aqui podemos ver que usamos un elemento tabla.

</
body>
</
html>

Ahora con el ejemplo de arriba hacemos uso del elemento tabla como contenedor de la imagen. Copie y pegue el código de arriba en el recuadro de Vista del Código y haga clic en “Renderizar”.

El siguiente ejemplo, conseguiremos la misma apariencia como en el ejemplo de arriba pero usaremos el elemento div. Copie y pegue el código de abajo en el recuadro de Vista de Código y haga clic en “Renderizar”.


<
html>
<
head>
<
title>DIV Flotante</title>
</
head>
<
body>
<
div style="float: right; width: 100px;">
<
img src="images/STUCK.gif" border="0" />
<
br />
<
p align="left">Algun texto va aqui.</p>
</
div>
<
h1>DIV Flotante</h1>
Aqui podemos ver que usamos un elemento div.

</
body>
</
html>

Puede ver que el resultado es el mismo. Así que no pase demasiado tiempo decidiendo qué elemento es el mejor para su objetivo. Conforme gane más experiencia sus decisiones sobre el mejor elemento llegarán a ser más fáciles. De acuerdo con los ejemplos de arriba, ambos consiguen el mismo objetivo. En una situación real, si yo nunca fuera a expandir la página usaría el elemento
<div>. Si hay una posibilidad de expandir la página usaría el elemento <table>. Todo depende de su objetivo.

Aquí tenemos otro ejemplo. Esta vez usaremos el elemento
<p>.

<
html>
<
head>
<
title>P Flotante</title>
</
head>
<
body>
<
p style="float: right; width: 100px;">
<
img src="images/STUCK.gif" border="0" />
<
br />
Algun texto va aqui.

</
p>
<
h1>P Flotante</h1>
Aqui podemos ver que usamos un elemento p.

</
body>
</
html>

El resultado es el mismo. ¡Chulo, eh!

 

Computer Security
AntiVirus Software
Internet Security
Parental Controls
Backup & Recovery
Computer Protection
Anti Malware
Photo & Video
Photo & Video Editing
Video Music
Desktop Publishing
Professional Design
Home Publishing
Clipart
Business & Accounting
Accounting
Payroll
Check Printing
TAX
H&R Block
Microsoft Office
Design
Graphic Design
Home Design
Garden Design
Interior Design
Computer Aided Design
3D Design
Students & Teacher
Adobe
Microsoft Office
Dragon Naturally Speaking
Corel Draw
Serif
Student/Teacher Software
Copy Right 2006 SpeakComputers.com - All Rights Reserved.
Home About Privacy Policy Resouces