diseÑo de pÁginas web html y css tema 1: introducción jose miguel vidagany igual

19
DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Upload: teresa-moreno-acuna

Post on 03-Feb-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

DISEÑO DE PÁGINAS WEB HTML Y CSS

Tema 1: Introducción

Jose Miguel Vidagany Igual

Page 2: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Estructura básica

<!DOCTYPE html><html><body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body></html>

Page 3: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Doctype

HTML 5

<!DOCTYPE html>

HTML 4.01 Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

HTML 4.01 Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

HTML 4.01 Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

Page 4: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Comentarios

<!– Esto es un comentario -->

Page 5: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Etiquetas

Recomienda en Minúsculas para HTML Algunas etiquetas son anidables Algunas etiquetas no tienen etiqueta de

apertura

Page 6: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Atributos

Algunos elementos pueden tener attributos

Los atributos nos dan información adicional.

Siempre van en el tag de apertura the start tag

Suelen ir en parejas: name=“value” los atributos van entre comillas Se escriben en minusculas

Page 7: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Atributos

class Specifies one or more classnames for an element (refers to a class in a style sheet)

id Specifies a unique id for an element

style Specifies an inline CSS style for an element

title Specifies extra information about an element (displayed as a tool tip)

Page 8: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Elementos block

Ejemplos: <h1>, <p>, <ul>, <table> No siempre se ven block

Page 9: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Elementos inline

Se ven sin empezar en una nueva linea. ejemplos: <b>, <td>, <a>, <img>

Page 10: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

cabeceras

<h1>This is a heading</h1><h2>This is a heading</h2><h3>This is a heading</h3>

Page 11: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Lineas

<hr>

Page 12: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Formato de texto

<b> Defines bold text

<em> Defines emphasized text 

<i> Defines a part of text in an alternate voice or mood

<small> Defines smaller text

<strong> Defines important text

<sub> Defines subscripted text

<sup> Defines superscripted text

<ins> Defines inserted text

<del> Defines deleted text

<mark> Defines marked/highlighted text

Page 13: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Salida de computador

Tag Description

<code> Defines computer code text

<kbd> Defines keyboard text 

<samp> Defines sample computer code

<var> Defines a variable

<pre> Defines preformatted text

Page 14: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Citas, comillas y definición

Tag Description

<abbr> Defines an abbreviation or acronym

<address>

Defines contact information for the author/owner of a document

<bdo> Defines the text direction

<blockquote>

Defines a section that is quoted from another source

<q> Defines an inline (short) quotation

<cite> Defines the title of a work

<dfn> Defines a definition term

Page 15: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Algunos ejemplos

<address>Written by <a href="mailto:[email protected]">Jon Doe</a>.<br> Visit us at:<br>Example.com<br>Box 564, Disneyland<br>USA</address>

Page 16: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Resultado

Written by Jon Doe.Visit us at:Example.comBox 564, DisneylandUSA

Page 17: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Ejemplos

<!DOCTYPE html>

<html>

<body>

<p><b>este testo esta en negrita</b></p>

<p><strong>este texto es strong</strong></p>

<p><i>texto en italic (cursiva)</i></p>

<p><em>texto con énfasis </em></p>

<p><code>Texto de salida de código</code></p>

<p>Este texto tiene<sub> subscript</sub> y <sup>superscript</sup></p>

</body>

</html>

Page 18: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Resultado

This text is boldThis text is strongThis text is italicThis text is emphasizedThis is computer output*This is subscript and superscript

Page 19: DISEÑO DE PÁGINAS WEB HTML Y CSS Tema 1: Introducción Jose Miguel Vidagany Igual

Enlaces

<a href="http://marca.com">MarcaW3C</a> Este es un enlace a la web del periódico Marca .

Si no está visitado tiene subrayado y color azul Si está visitado, se cambia el color a púrpura Si está activo sigue subrayado y en color rojo