Manual de HTML: Secciones de un documento HTML
Un documento HTML genérico será similar a:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Hello World</title> </head> <body> <h1>Hello World</h1> </body> </html>
Podemos diferenciar tres secciones básicas en un documento HTML:
- Declaración de tipo de documento
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> </html>
- <!DOCTYPE>
Define el tipo de documento. La primera palabra tras DOCTYPE es el tag raíz, en este caso html.
- <html></html>
Indica al navegador el inicio y el final del documento HTML.
- <!DOCTYPE>
- Cabecera o head
<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Hello World</title> </head>
- Cuerpo o body
<body> <h1>Hello World</h1> </body>
- <body></body>
Define el cuerpo del documento HTML y su contenido sí es visible en el navegador.
- Etiquetas que suelen aparecer en el body (alfabéticamente):
<!-- -->, <a>, <abbr>, <acronym>, <address>, <area />, <b>, <bdo>, <big>, <blockquote>, <br />, <button>, <caption>, <center>, <cite>, <code>, <col />, <colgroup>, <dd>, <del>, <div>, <dfn>, <dl>, <dt>, <em>, <fieldset>, <font>, <form>, <frame />, <frameset>, <h1> - <h6>, <hr />, <i>, <iframe>, <img />, <input />, <ins>, <kbd>, <label>, <legend>, <li>, <map>, <nobr>, <noframes>, <noscript>, <object>, <ol>, <optgroup>, <option />, <p>, <param />, <pre>, <q>, <s>, <samp>, <script>, <select>, <small>, <span>, <strike>, <strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, <th>, <thead>, <tr>, <tt>, <u>, <ul>, <var>.
- <body></body>
Recursos
- Etiquetas HTML 4.01: Tags ordered alphabetically
Deja un comentario