CODIGO HTML

62
<H1>html</H1> <h2>Qué es el html y para qué sirve</h2> Por Erika Montesdeoca

Transcript of CODIGO HTML

Page 1: CODIGO HTML

<H1>html</H1><h2>Qué es el html y para qué

sirve</h2>

Por Erika Montesdeoca

Page 2: CODIGO HTML

Qué es HTMLLenguaje de Marcado más extendido

Page 3: CODIGO HTML

Qué es HTMLLenguaje de Marcado más extendido

•Codificar un documento• Industr ia Editorial•Dictado a viva voz

Clases•Presentación•Procedimientos•Descripttivo

Page 4: CODIGO HTML

19861991

SGM

LLenguaje de MarcadoGeneralizado Standard

Qué es HTML

HTM

LLenguaje de Marcas de Hipertextos

Page 5: CODIGO HTML

Para qué sirve

Page 6: CODIGO HTML

Para qué sirve

Describir esttructtura y conttenido

Page 7: CODIGO HTML

Para qué sirve

Describir esttructtura y conttenido

Complementtar el texto con Objetos

Page 8: CODIGO HTML

Para qué sirve

Describir esttructtura y conttenido

Complementtar el texto con Objetos

Se escribe en forma de “Ettiquettas”

Page 9: CODIGO HTML

<>

Para qué sirve

Describir esttructtura y conttenido

Complementtar el texto con Objetos

Se escribe en forma de “Ettiquettas”

Rodeada por Corchettes An g u l ares

Page 10: CODIGO HTML

Modularización (XHTML)de elementos

Declaración / DOCTYPE

Page 11: CODIGO HTML

Modularización (XHTML)de elementos

Declaración /

DOCTYPE Elemento

Raiz / <httml>

Page 12: CODIGO HTML

Modularización (XHTML)de elementos

Declaración / DOCTYPE

Elemento Raiz / <httml>

Modular izac ión. Módulo de:Esttructtura / body, head, html, tit le Textto / abbr, acronym, address, etc. Hiperttextto / aListta / dl, dt, dd, ol, ul, li.Objettos / object, param. Presenttación / b, big, hr, i, etc. ettc. /

Page 13: CODIGO HTML

<a href=”” title=””>texto de enlace</a>

Estructura de Elementos

Elementto

Page 14: CODIGO HTML

<a href=”” title=””>texto de enlace</a>

<Etiqueta inicial>

Estructura de Elementos

Elementto

</Etiqueta final >

Page 15: CODIGO HTML

<a href=”” title=””>texto de enlace</a>

<Etiqueta inicial>

Estructura de Elementos

Elementto

</Etiqueta final >

Contenido

Page 16: CODIGO HTML

<a href=”” title=””>texto de enlace</a>

<Etiqueta inicial>

Estructura de Elementos

Elementto

Atributo=”valor”

</Etiqueta final >

Contenido

Page 17: CODIGO HTML

<Etiqueta inicial>

Estructura de Elementos

Elementto

Atributo=”valor”

</Etiqueta final >

Contenido

<a href=”” ttiittllee==””””>>texto de eennllaaccee</a>

Page 18: CODIGO HTML

Declaración / DOCTYPENo es una etiqueta sino una

insttrucción

•Definición del Tipo de Documentto (DTD)• E l DTD especifica las reglas para ellenguaje de marcado

• XHTML 1.0 Strict / XHTML 1.0 Transitional• XHTML 1.1• HTML 4.0 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/ xhtml1/DTD/xhtml1-strict.dtd">

Page 19: CODIGO HTML

Elemento Raiz / <html>Etiqueta que contiene todo el HTML

• In forma al navegador que lo contenido por él debe ser interpretado como HTML• In ic io y término del documento

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/ xhtml1/DTD/xhtml1-strict.dtd">

<html><head>

...elementos del head...

</head><body>

...elementos del body...

</body>

</html>

Page 20: CODIGO HTML

<html>

</html>

Estructura de documento

Page 21: CODIGO HTML

</html>

<html>

<head>

</head>

Estructura de documento

Page 22: CODIGO HTML

</body>

</html>

<html>

<head>

</head>

<body>

Estructura de documento

Page 23: CODIGO HTML

</body>

</html>

<html>

<head>

</head>

<body>

Estructura de documento

Page 24: CODIGO HTML

<body>

</body>

</html>

</head>

Estructura de documento <html>

<head>

<title> y otros elementos

Módulos de:• Estructura

• h tm l , head, title, body

•Metainformación•Estilos• L i n k•Base

Page 25: CODIGO HTML

</body>

</html>

</head>

Estructura de documento <html>

<head>

<title> y otros elementos

<body>

elementos

Módulos de:• Estructura

• h tm l , head, title, body•Metainformación•Estilos• L i n k•Base

Módulos de:• Texto

• p , code, div, em, strong, span, q,pre, samp, h1, h2, h3, etc

• Hipertexto• Lis ta•Objetos•Presentación•Edición•Formularios•Tablas• Imágen•Otros

Page 26: CODIGO HTML

¿Para quién?Usuarios

Comunicamos/Informamos

Page 27: CODIGO HTML

¿Para quién?Humanos MáquinasUsuarios

Comunicamos/Informamos

Page 28: CODIGO HTML

¿Para quién?Humanos MáquinasUsuarios

Comunicamos/Informamos

Visible “Invisible”

Page 29: CODIGO HTML

¿Para quién?Humanos

Titular principal

MáquinasUsuarios

Comunicamos/Informamos

Visible “Invisible”

➡ h1

Page 30: CODIGO HTML

¿Para quién?Humanos MáquinasUsuarios

Comunicamos/Informamos

Visible “Invisible”

Titular principal

Contenido del artículo➡➡

h1

p

Page 31: CODIGO HTML

¿Para quién?Humanos MáquinasUsuarios

Comunicamos/Informamos

Visible “Invisible”

Titular principal

Contenido del

artículo Lista de

elementos

➡➡➡

h1

p

ol, ul, li, li, li, li, li.

Page 32: CODIGO HTML

¿Para quién?Humanos MáquinasUsuarios

Comunicamos/Informamos

Visible “Invisible”

Titular principal

Contenido del

artículo Lista de

elementos Datos en

excel

➡➡➡➡

h1

p

ol, ul, li, li, li, li,

li. table, td, tr,

Page 33: CODIGO HTML

¿Para quién?Humanos MáquinasUsuarios

Comunicamos/Informamos

Visible “Invisible”

Titular principal

Contenido del

artículo Lista de

elementos Datos en

excel

➡➡➡➡➡

h1

p

ol, ul, li, li, li, li,

li. table, td, tr,

Valores de atributos

www.maximiliano.cl

Page 34: CODIGO HTML

¿Para quién?Humanos MáquinasUsuarios

Comunicamos/Informamos

Visible “Invisible”

Titular principal

Contenido del

artículo Lista de

elementos Datos en

excel

➡➡➡➡➡

h1

p

ol, ul, li, li, li, li,

li. table, td, tr,

Valores de atributos

Page 35: CODIGO HTML

<head> o cabeceraContiene información sobre el documento

que: no se muestra directamente al usuario

Page 36: CODIGO HTML

<head> o cabecera

<html><head>

<title>Gu&iacute;a de Referencia R&aacute;pida XHTML</title>

</head><body>

...elementos del body...</body>

</html>

Contiene información sobre el documento que: no se muestra directamente al usuario

<ttittle>

Page 37: CODIGO HTML

<head> o cabeceraContiene información sobre el documento

que: referencia a metaetiquetas

Page 38: CODIGO HTML

<head> o cabecera

<meta name="Description" conttentt="Qué es HTML y para qué sirve" /><meta name="Keywords"<meta name="Author"<meta name="Copyright"

conttentt="HTML,XHTML,tutorial HTML" /> conttentt="Maximiliano Martin" /> conttentt="...

Contiene información sobre el documento que: referencia a metaetiquetas

<metta>

Page 39: CODIGO HTML

<head> o cabeceraContiene información sobre el documento que:

relaciona mediante vínculos a otras URL o archivos

Page 40: CODIGO HTML

<head> o cabecera

<link ttype="text/css" rel="stylesheet" href="css/base.css" /><link ttype="text/css" media="print" rel="stylesheet" href="css/print.css" /><link ttype="text/css" media="aural" rel="stylesheet" href="css/aural.css" />

Contiene información sobre el documento que: relaciona mediante vínculos a otras URL o archivos

<l ink>

Page 41: CODIGO HTML

<body> o cuerpoDefine el contenido del documento. Lo que

se muestra a través del navegador

Page 42: CODIGO HTML

...</body>

<body> o cuerpoDefine el contenido del documento. Lo que

se muestra a través del navegador

<body>...

Elementos en bloque Elementos en l inea

Page 43: CODIGO HTML

...</body>

<body> o cuerpoDefine el contenido del documento. Lo que

se muestra a través del navegador

<body>...

Elementos en bloque Elementos en l inea

Page 44: CODIGO HTML

...</body>

<body> o cuerpoDefine el contenido del documento. Lo que

se muestra a través del navegador

<body>...

Elementos en bloque Elementos en l inea

Page 45: CODIGO HTML

...</body>

<body> o cuerpoDefine el contenido del documento. Lo que

se muestra a través del navegador

<body>...

Elementos en bloque Elementos en l inea

Page 46: CODIGO HTML

...</body>

<body> o cuerpoDefine el contenido del documento. Lo que

se muestra a través del navegador

<body>...

Elementos en bloque Elementos en l inea

p, div, ol, ul, li,h1, h2, h3, etc.

a, img, em, strong, span, etc.

Page 47: CODIGO HTML

...</body>

<body> o cuerpoDefine el contenido del documento. Lo que

se muestra a través del navegador

<body>...

Elementos en bloque Elementos en l inea

p, div, ol, ul, li,h1, h2, h3, etc.

a, img, em, strong, span, etc.

Page 48: CODIGO HTML

Valores de AtributosPropiedad de algunos elementos a los que se

les asigna Valores específicos (Humanos/Robots)

<a> v í ncu lo o anc la </a>

Page 49: CODIGO HTML

Valores de AtributosPropiedad de algunos elementos a los que se

les asigna Valores específicos (Humanos/Robots)

<a> v í ncu lo o anc la </a>

<a href=”http://www.wikipedia.com/ancla/” ttittle=”Definición de Wikipedia” rel=”External”>

vínculo o ancla </a>

• hre f• t i t l e• class• i d

•hreflang•accesskey• r e l• tabindex

Page 50: CODIGO HTML

Valores de AtributosPropiedad de algunos elementos a los que se

les asigna Valores específicos (Humanos/Robots)

<img s r c = ” U R I ” />• sc r• a l t• class• i d

<img src=”http://www.w3c.es/img/eslogo-20030729.png” altt="Oficina española del W3C" heightt="52" widtth="279" />

• height• longdesc• wid th

Page 51: CODIGO HTML

+ ElementosPropiedad de algunos elementos a los que se les asigna Valores específicos (Humanos/Robots)

•Esttructtura: body, head, html, tit le•Textto: abbr, acronym, address, blockquote, br,cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var•Presenttación : b, big, hr, i, small, sub, sup, t t• Fo r m u l a r i o s : button, fieldset, form, input, label, legend, select, optgroup, option, textarea• Ta b l a s : caption, col, colgroup, table, tbody, td, tfoot, th, thead, t r• M a p a de I m a ge n del lado Clientte: area, map• M a p a de I m a ge n del lado Ser v idor : Attribute ismap on img

•Hiperttextto: a• Listta : dl, dt, dd, ol, ul, l i•Objettos: object, param• E d i c i ó n : del, ins•Textto Bidirecc ional : bdo• M ó d u l o de Imagen: img• Mettainformación: meta•Scriptting : noscript, script• H o j a de Esttilo: style element• L i n k : l ink• B a s e : base

Page 52: CODIGO HTML

+ ElementosPropiedad de algunos elementos a los que se les asigna Valores específicos (Humanos/Robots)

•Esttructtura: body, head, html, tit le•Textto: abbr, acronym, address, blockquote, br,cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var•Presenttación : b, big, hr, i, small, sub, sup, t t• Fo r m u l a r i o s : button, fieldset, form, input, label, legend, select, optgroup, option, textarea• Ta b l a s : caption, col, colgroup, table, tbody, td, tfoot, th, thead, t r• M a p a de I m a ge n del lado Clientte: area, map• M a p a de I m a ge n del lado Ser v idor : Attribute ismap on img

•Hiperttextto: a• Listta : dl, dt, dd, ol, ul, l i•Objettos: object, param• E d i c i ó n : del, ins•Textto Bidirecc ional : bdo• M ó d u l o de Imagen: img• Mettainformación: meta•Scriptting : noscript, script• H o j a de Esttilo: style element• L i n k : l ink• B a s e : base

Comments

<!-- Comment Text -->

Core Attributes

class

idNote: Core Attributes may not be used

in base, head, html, meta, param,

script, style or title elements.

style

title

Language Attributes

dirNote: Language Attrib

utes may not be

used in base, br, frame, fra

meset, hr,

iframe, param or script elements.

lang

Keyboard Attributes

accesskey

tabindex

Form Events

onBlur

onChange

onFocus

onReset

onSelect

onSubmit

Window Events

onLoad

onUnload

Keyboard Events

onKeydown

onKeypress

onKeyup

Mouse Events

onClick

onDblclick

onMousedown

onMousemove

onMouseout

onMouseover

onMouseup

Document Outline

<!DOCTYPE>

<html>

<head>

<body>

Version of (X)HTML

HTML document

Page information

Page contents

Common Character Entities

&#34;

&#38;

&#60;

&#62;

&#64;

&#128;

&#149;

&#153;

&#163;

&#160;

&#169;

"&<>@

€•™

£

©

Quotation mark

Ampersand

Less than

Greater than

"At" symbol

EuroSmall bullet

Trademark

Pound

Non-breaking space

Copyright symbol

Available free from AddedBytes.com

Links

<a href="">Page link

<a href="mailto:"> Email link

<a name="name"> Anchor

<a href="#name"> Link to anchor

Empty Elements

<area />

<base />

<br />

<col />

<hr />

<img />

<input />

<link />

<meta />

<param />

Page Information

<base />

<meta />

<title>

<link />

<style>

<script>

Base URL

Meta data

TitleRelevant resource

Style resource

Script resource

Tables

<table>

<caption>

<thead>

<tbody>

<tfoot>

<colgroup>

<col />

<tr><th>

<td>

Table

Caption

Table header

Table body

Table footer

Column group

Column

Table row

Header cell

Table cell

Forms

<form>

<fieldset>

<legend>

<label>

<input />

<select>

<optgroup>

<option>

<textarea>

<button>

FormCollection of fields

Form legend

Input label

Form input

Drop-down box

Group of options

Drop-down options

Large text input

Button

Objects

<object>

<param />

Object

Parameter

Document Structure

<h[1-6]>

<div>

<span>

<p><br />

<hr />

Heading

Page section

Inline section

Paragraph

Line break

Horizontal rule

Lists

<ol>

<ul>

<li><dl>

<dt>

<dd>

Ordered list

Unordered list

List item

Definition list

Definition term

Term description

Text Markup

<strong>

<em>

<blockquote>

<q><abbr>

<acronym>

<address>

<pre>

<dfn>

<code>

<cite>

<del>

<ins>

<sub>

<sup>

<bdo>

Strong emphasis

Emphasis

Long quotation

Short quotation

Abbreviation

Acronym

Address

Pre-formatted text

Definition

Code

Citation

Deleted text

Inserted text

Subscript

Superscript

Text direction

Images and Image Maps

<img />

<map>

<area />

Image

Image Map

Area of Image Map

Page 53: CODIGO HTML

WYSIWYG

Page 54: CODIGO HTML

WYSIWYGWhat You See Is What You Get Lo que ves es lo que obtienes

Page 55: CODIGO HTML

WYSIWYGWhat You See Is What You Get Lo que ves es lo que obtienes

Page 56: CODIGO HTML

WYSIWYGWhat You See Is What You Get Lo que ves es lo que obtienes

Page 57: CODIGO HTML

ValidaciónVerifica la correcta implementación del código

según el DTD declarado

http://validator.w3.org/

Page 58: CODIGO HTML

Validación

Page 59: CODIGO HTML

Accesibilidad

http://www.discapnet.es/web_accesible/tecnicas/html/WCAG10-HTML-

TECHS_es.html/

Proporciona alternativas para que lleguemos a más usuarios con nuestro mensaje/información

•Metaetiquetas l ink• Texto de vínculos• Atr ibutos alt, longdesc, rel, Acceskey, tabindex• Estructura de cabeceras h1, h2, h3•Cambios de idioma

Page 60: CODIGO HTML

EjercicioEscribir las etiquetas identificadas

Page 61: CODIGO HTML

Ejercicio¿Cuántos elementos HTML

puedes nombrar en 5 minutos?

Page 62: CODIGO HTML

Gracias