Anda di halaman 1dari 65

SERVIO PBLICO FEDERAL MINISTRIO DA EDUCAO CENTRO FEDERAL DE EDUCAO TECNOLGICA DE MINAS GERAIS UNIDADE DE ENSINO DESCENTRALIZADA DE DIVINPOLIS

NDICE ANALTICO
TAG <!--...--> tag________________________________________________________4 TAG <!DOCTYPE> tag___________________________________________________4 TAG <a> tag____________________________________________________________5 TAG <abbr> tag_________________________________________________________7 TAG <acronym> tag______________________________________________________8 TAG <address> tag_______________________________________________________8 TAG <applet> tag________________________________________________________9 TAG <area> tag_________________________________________________________10 TAG <base> tag_________________________________________________________11 TAG <basefont> tag_____________________________________________________12 TAG <bdo> tag_________________________________________________________12 TAG <blockquote> tag___________________________________________________13 TAG <body> tag________________________________________________________14 TAG <button> tag_______________________________________________________15 TAG <caption> tag______________________________________________________15 TAG <center> tag_______________________________________________________16 TAG <col> tag__________________________________________________________16 TAG <colgroup> tag_____________________________________________________18 TAG <dd> tag__________________________________________________________19 TAG <del> tag__________________________________________________________19 TAG <dir> tag__________________________________________________________20 TAG <div> tag__________________________________________________________20 TAG <dl> tag___________________________________________________________21 TAG <dt> tag___________________________________________________________21 TAG <em> <strong> <dfn> <code> <samp> <kbd> <var> <cite> tags____________22 TAG <fieldset> tag______________________________________________________23 TAG <font> tag_________________________________________________________23 TAG <form> tag________________________________________________________24 TAG <frame> tag_______________________________________________________25 TAG <frameset> tag_____________________________________________________26 TAG <head> tag________________________________________________________27

TAG <h1> a <h6> tags___________________________________________________27 Este um cabealho 1____________________________________________________28 TAG <hr> tag__________________________________________________________28 TAG <html> tag________________________________________________________29 TAG <iframe> tag_______________________________________________________29 TAG <img> tag_________________________________________________________30 TAG <input> tag________________________________________________________31 TAG <ins> tag__________________________________________________________33 TAG <label> tag________________________________________________________34 TAG <legend> tag_______________________________________________________34 TAG <li> tag___________________________________________________________35 TAG <link> tag_________________________________________________________36 TAG <map> tag_________________________________________________________38 TAG <menu> tag________________________________________________________39 TAG <meta> tag________________________________________________________39 TAG <noframes> tag____________________________________________________40 TAG <noscript> tag_____________________________________________________41 TAG <object> tag_______________________________________________________42 TAG <ol> tag___________________________________________________________43 TAG <optgroup> tag_____________________________________________________44 TAG <option> tag_______________________________________________________45 TAG <p> tag___________________________________________________________46 TAG <pre> tag__________________________________________________________46 TAG <q> tag___________________________________________________________47 TAG <s> and <strike> tags________________________________________________48 TAG <script> tag________________________________________________________48 TAG <select> tag________________________________________________________49 TAG <span> tag________________________________________________________50 TAG <style> tag_________________________________________________________51 TAG <sub> and <sup> tags_______________________________________________52 TAG <table> tag________________________________________________________52 TAG <tbody> tag________________________________________________________53 TAG <td> tag___________________________________________________________55 TAG <textarea> tag_____________________________________________________56 TAG <tfoot> tag________________________________________________________57 UnED Divinpolis Sallum Prof. William 2

TAG <th> tag___________________________________________________________59 TAG <thead> tag________________________________________________________60 TAG <title> tag_________________________________________________________61 TAG <tr> tag___________________________________________________________62 TAG <tt> <i> <b> <big> <small> tags______________________________________63 TAG <u> tag___________________________________________________________64 TAG <ul> tag___________________________________________________________64

UnED Divinpolis Sallum

Prof. William

SERVIO PBLICO FEDERAL MINISTRIO DA EDUCAO CENTRO FEDERAL DE EDUCAO TECNOLGICA DE MINAS GERAIS UNIDADE DE ENSINO DESCENTRALIZADA DE DIVINPOLIS

TAG <!--...--> tag


Definio e Utilizao
A tag de comentrio usada para inserir um comentrio no cdigo fonte. O comentrio ser ignorado pelo browser. Esta tag muito til quando necessria a cdompreeno do cdigo posteriormente. Pode-se, tambm, armazenar informaes especficas no comentrio.

Exemplo
Fonte <!Isto um comentrio--> <p>Isto um pargrafo normal</p> Sada Isto um pargrafo normal

TAG <!DOCTYPE> tag


Definio e Utilizao
A declarao <!DOCTYPE> a primeira linha do programa, antes da tag <html>. Esta tag informa ao browser sobre se o documento utiliza as especificaes HTML ou XHTML.

HTML
HTML 4.01 especifica trs tipo de documentos: Strict (restrito), Transitional (transitrio), e Frameset (configuraes).

HTML Strict DTD


Utilizado quando se precisa limpar tags, organizando a apresentao. Utilizado junto com Cascading Style Sheets (CSS): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

HTML Transitional DTD


O Transitional DTD inclui atributos de apresentao e elementos que o consrcio W3C espera transportar para uma folha de estilo. Este tipo utilizado para apresentar caractersticas HTMLs quando alguns browser no suportam Cascading Style Sheets (CSS): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Frameset DTD
O tipo Frameset DTD dever ser utilizado com documentos com Framenser. O Frameset DTD tal qual o Transitional DTD com exceo do elemento de frameset que substitui o elemento de corpo: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

XHTML
XHTML 1.0 especifica trs tipo de documentos: Strict (restrito), Transitional (transitrio), e Frameset (configuraes).

XHTML Strict DTD


Use este DTD se precisar limpar tags, organizando a apresentao. Utilizado junto com Cascading Style Sheets (CSS): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

XHTML Transitional DTD


O Transitional DTD inclui atributos de apresentao e elementos que o consrcio W3C espera transportar para uma folha de estilo. Este tipo utilizado para apresentar caractersticas HTMLs quando alguns browser no suportam Cascading Style Sheets (CSS): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

XHTML Frameset DTD


Utilizado quando se necessita utilizar frames! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> Para constatar que se escreveu um documento SHTML vlido, com um DTD correto, pode-se linkar a pgina XHTML a um validador XHTML.

TAG <a> tag


Definio e Utilizao
A tag <a> define uma ncora. Uma ncora pode ser usada em duas possibilidades:

1. 2.

Para se crier um link para um outro documento utilizando o atributo href Para crier um bookmark - marcador de ginas dentro do documento usando o atributo name ou id

Tipos e Notas

UnED Divinpolis Sallum

Prof. William

Nota: Uma pagina lincada normalmente visializada na janela do browser ativo, a menos que se especifique outra.

Exemplo
Fonte <p>Linkando ao CEFETMG: <a href="http://www.cefetmg.br"> CEFETMG</a> </p> <p> Abrindo uma nova janela CEFETMG: <a href="http://www. cefetmg.br " target="_blank">CEFETMG</a> </p> Sada Linkando ao CEFETMG: CEFETMG Abrindo uma nova janela CEFETMG:

CEFETMG

Atributos Opcionais
DTD indica em qual tipo de documento o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo charset coords Valor character_encoding Se shape="rect" ento coords="left,top,right,bottom" se shape="circ" ento coords="centerx,centery,radius" se shape="poly" ento coords="x1,y1,x2,y2,..,xn,yn" href hreflang name rel URL language_code section_name alternate designates stylesheet start next prev contents index glossary copyright chapter section subsection appendix help bookmark alternate designates stylesheet start next prev contents index glossary A URL correspondente ao link. Especifica a linguagem bsica da URL Nomeia uma ncora. Usado para criar uma marca no documento. STF STF STF Descrio Especifica o cacarcter que codifica a URL Especifica as coordenadas corespondentes s formas da regio da imagem mapeada. DTD STF STF

Especifica a relao entre o documento atual e STF a URL designada.

rev

Especifica a relao entre a URL designada e o STF documento atual.

UnED Divinpolis Sallum

Prof. William

copyright chapter section subsection appendix help bookmark shape rect rectangle circ circle poly polygon _blank _parent _self _top Define o tipo de regio a ser definida para mapeamento na tag da atual area. STF

target

Como abrir a URL desejada:

TF

_blank - a URL ser aberta em uma nova janela _self a URL sera aberta na mesma janela onde foi clickada _parent - a URL sera aberta na janela anterior _top - a URL sera aberta de forma maximizada STF

type

mime_type

Especifica o tipo de MIME (Multipurpose Internet Mail Extensions) da URL

Atributos Padres
id, class, title, style, dir, lang, xml:lang, tabindex, accesskey

Atributos Eventuais
onfocus, onblur, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <abbr> tag


Definio e Utilizao
Indica uma forma abreviada, como " Inc "., etc. ". Marcando as abreviaes pode-se obter informao teis dos browsers, sistemas de traduo e mquinas de procura-indexadas.

Tipos and Notas


Tipo: Em alguns browser o atributo title pode ser usado para mostrar a verso completa da expresso quando o mouse se encontrar em cima da abreviao.

Exemplo
Fonte Sada <abbr title="Centro Federal de Ensino CEFET Tecnolgico">CEFET</abbr>

Atributos Padres
id, class, title, style, dir, lang, xml:lang

UnED Divinpolis Sallum

Prof. William

TAG <acronym> tag


Definio e Utilizao
A tag <acronym> determina o comeo de um acrnimo, como WWW. Marcando os acrnimos pode-se obter informao teis dos browsers, sistemas de traduo e mquinas de procuraindexadas

Tipos e Notas
Tipo: Em alguns browser o atributo title pode ser usado para mostrar a verso completa da expresso quando o mouse se encontrar em cima da abreviao

Exemplo
Fonte <acronym title="World Wide Web">WWW</acronym> Sada WWW

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <address> tag


Definio e Utilizao
A tag <address> determina comeo de um endereo. Deve ser usado para definer endereos, assinaturas, ou autorias de documentos.

Tipos e Notas
Nota: O endereo normalmente e feito em italico. Alguns browsers adicionam uma linha de quebra antes e depois do elemento endereo, Mas quebras de linhas dentro do texto devem ser inseridas por voc mesmo.

Exemplo
Fonte <address> Jos Silva<br /> Rua das flores<br /> Brasil </address> Sada Jos Silva Rua das flores Brasil

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

UnED Divinpolis Sallum

Prof. William

TAG <applet> tag


Definio e Utilizao
Define um applet embutido.

Tipos e Notas
Nota: Para Incluir applets, se possvel, use o elemento de objeto.

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo height width Valor pixels pixels Descrio Define a altura do applet Define a largura do objeto DTD TF TF

Atributos Opcionais
Atributo align Valor left right top bottom middle baseline texttop absmiddle absbottom text URL URL URL pixels unique_name name text pixels Descrio Define o alinhamento de texto do applet DTD TF

alt archive code codebase hspace name object title vspace

Um texto alternativo a ser exibido se o browser suporta applets mas no pode executar este applet Uma URL para o applet quando est parado em um arquivoJava ou ZIP Uma URL que aponta para a classe do applet Indica a URL base do applet se o atributo cdigo relativo Define o espaameno horizontal do applet

TF TF TF TF TF

Define um nome nico para o applet (a ser usado em TF script) Define o nome do recurso que contem a representao serial do applet Informao adicional a ser mostrada na ponta da ferramenta Define o espaamento vertical do applet TF TF TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
accesskey, tabindex, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

UnED Divinpolis Sallum

Prof. William

TAG <area> tag


Definio e Utilizao
Define uma regio de uma imagem mapeada.

Tipos e Notas
Este elemento j se encontra dentro da tag <map>. Nota: O atributo usemap em <image> refere-se ao atributo id ou name no <map>.

Exemplo
Fonte <p>Click em um dos planetas:</p> <img src ="planetas.gif" width="145" height="126" alt="Planetas" usemap ="#planetamapa" /> <map id ="planetamapa" name="planetamapa"> <area shape ="rect" coords ="0,0,82,126" href ="sol.htm" target ="_blank" alt="Sun" /> <area shape ="circle" coords ="90,58,3" href ="mercurio.htm" target ="_blank" alt="Mercury" /> <area shape ="circle" coords ="124,58,8" href ="venus.htm" target ="_blank" alt="Venus" /> </map> Sada Click on one of the planets:

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo alt Valor text Descrio Especifica um texto alternative para a rea DTD STF

Atributos Opcionais
Atributo coords Valor se shape="rect" ento coords="left,top,right,bottom" se shape="circ" ento coords="centerx,centery,radius" se shape="poly" ento coords="x1,y1,x2,y2,..,xn,yn" href nohref URL true Especifica a URL desejada da rea STF Descrio DTD Especifica as coordenadas para a STF area clickavel

Exclue uma area de uma imagem STF

UnED Divinpolis Sallum

Prof. William

10

false shape rect rectangle circ circle poly polygon _blank _parent _self _top

mapeada Define a forma de uma rea STF

target

Como abrir a URL desejada:

TF

_blank - a URL ser aberta em uma nova janela _self a URL sera aberta na mesma janela onde foi clickada _parent - a URL sera aberta na janela anterior _top - a URL sera aberta de forma maximizada

Atributos Padres
id, class, title, style, dir, lang, xml:lang, tabindex, accesskey

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, onfocus, onblur

TAG <base> tag


Definio e Utilizao
O elemento base especifica a URL base para todos os links na pgina.

Tipos e Notas
Nota: A tag <base> deve ser inserida dentro do elemento head.

Exemplo
Suponha que o endereo absoluto da imagem seja: <img src="http://www.cefetmg.br/imagens/logo.gif" /> Agora, ao inserir a tag <base>, o qual especifica a URL base para todos os links na pgina, dever ficar assim: <head> <base href="http://www. cefetmg.br/imagens/" /> </head> Isto feito, para se inserir imagens na pgina, conforme o exemplo acima, sera necessrio apenas especificar o endereo relative que o browser identificar como URL completa: "http://www. cefetmg.br/imagens/logo.gif", ficando assim:

UnED Divinpolis Sallum

Prof. William

11

<img src="logo.gif" />

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo href Valor URL Descrio Especifica a URL a ser usada como URL base para os links na pgina DTD STF

Atributos Opcionais
Atributo target Valor _blank _parent _self _top Descrio Onde abrir todos os links na pgina. Este atributo pode ser anulado usando o atributo desejado em cada link. DTD TF

_blank todos os links sero abertos em nova janela _self todos os links sero abertos na mesma janela em que foram clickados _parent todos os links sero abertos na janela anterior _top todos os links sero abertos em janela maximizada

TAG <basefont> tag


Definio e Utilizao
Define uma fonte base.

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo color Valor rgb(x,x,x) #xxxxxx colorname list_of_fontnames default_text_size (a number from 1 to 7) Descrio Especifica a cor do texto. DTD TF

face size

Especifica a fonte a ser usada. Tamanho de fonte para elemento de fonte.

TF TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <bdo> tag


Definio e Utilizao
O elemento bdo anula a direo padro do texto.

UnED Divinpolis Sallum

Prof. William

12

Exemplo
Fonte Sada <bdo dir="rtl">Este um texo escrito Este um texto escrito da direta para a esquerda da direta para a esquerda</bdo>

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo dir Valor ltr rtl Descrio Define a direo do texto DTD STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <blockquote> tag


Definio e Utilizao
A tag <blockquote> define o comeo de uma citao longa.

Tipos e Notas
Nota: O elemento blockquote cria spaos em branco em ambos os lados do texto.

Exemplo
Fonte Aqui se inicia uma longa citao: <blockquote> aqui est uma longa citao aqui est uma longa citao aqui est uma longa citao aqui est uma longa citao aqui est uma longa citao aqui est uma longa citao </blockquote> Sada Aqui se inicia uma longa citao: aqui est uma longa citao aqui est uma longa citao aqui est uma longa citao aqui est uma longa citao aqui est uma longa citao

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo cite Valor URL Descrio URL citao, se escolhido da web DTD STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

UnED Divinpolis Sallum

Prof. William

13

TAG <body> tag


Definio e Utilizao
O elemento body define o corpo do documento. Ele contem todo o contedo do documento (como textos, imagens, cores, grficos, etc.).

Exemplo
<html> <head> </head> <body> Aqui se encontra todo o corpo do documento...... </body> </html>

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo alink Valor rgb(x,x,x) #xxxxxx colorname file_name rgb(x,x,x) #xxxxxx colorname rgb(x,x,x) #xxxxxx colorname rgb(x,x,x) #xxxxxx colorname rgb(x,x,x) #xxxxxx colorname Descrio Especifica a cor do link ativo. DTD TF

background bgcolor

Define uma imagem para usar como fundo. A cor de fundo do documento.

TF TF

link

Especifica a cor de todos os links no documento.

TF

text

Especifica a cor do texto no documento.

TF

vlink

Especifica a cor do link visitado.

TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <br> tag


Definio e Utilizao
A tag <br> insere uma quebgra de linha. A tag <br> uma etiqueta vazia (Ela no tem nehuma etiqueta de finalizao o seguinte exemplo est incorreto: <br></br>).

Tipos e Notas

UnED Divinpolis Sallum

Prof. William

14

Nota: Utilize a tag <br> para entrar com linhas em branco, no para separar pargrafos.

Exemplo
Fonte Sada Este texto contem<br />uma linha em Este texto contem branco uma linha em branco

Atributos Padres
id, class, title, style

TAG <button> tag


Definio e Utilizao
Define um boto. Dentro de um elemento button pode-se colocar texto ou imagem (identificao do boto). Esta a diferena entre este elemento o os botes criados com o elemento input.

Exemplo
Fonte <button>Click aqui!</button> Sada Click aqui!

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo disabled name type Valor disabled button_name button reset submit some_value Descrio Desabilita o boto Especifica um nome nico para o boto Define um tipo de boto DTD STF STF STF

value

Especifica um valor inicial para o boto. O valor pode STF ser carregado de um script.

Atributos Padres
id, class, title, style, dir, lang, xml:lang, accesskey, tabindex

Atributos Eventuais
onfocus, onblur, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <caption> tag


Definio e Utilizao

UnED Divinpolis Sallum

Prof. William

15

Este elemento define uma legenda de tabela. A tag <caption> deve ser iserida imediatamente aps a tag <table>. Pode-se especificar somente uma legenda por tabela. Usualmente a legenda se encontrar centralizada acima da tabela.

Exemplo
Fonte <table border="1"> <caption>Esta uma legenda</caption> <tr> <td>Cel 1</td> <td>Cel 2</td> </tr> </table> Sada Esta uma legenda Cel 1 Cel 2

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor left right top bottom Descrio Como alinhar a legenda. DTD TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <center> tag


Definio e Utilizao
Centraliza horizontalmente o texsto inserido.

Tipos e Notas
Tipo: Use estilos CSS para centralizer textos!

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <col> tag

UnED Divinpolis Sallum

Prof. William

16

Definio e Utilizao
Define o valor de atributo para um ou mais colunas em uma mesa.somente pode-se usar este elemento dentro de uma tabela ou um colgroup (grupo de colunas)

Tipos e Notas
Nota: O elemento col um elemento vazio que contem somente atributos. Para criar colunas, deve-se especificar o elemento td dentro do elemento td. Tipo: Este elemento tambm utilizado quando se necessita especificar diferentes valores de atributos para uma coluna dentro de um colgroup (grupo de colunas). Sem um elemento col todos os valores herdaro todos os atributo estimados do colgroup.

Exemplo
Fonte Sada Este exemplo mostra um colgroup que tem trs Este exemplo mostra um colgroup que tem trs colunas de diferentes larguras: colunas de diferentes larguras: <table border="1"> 1 2 3 <colgroup span="3"> <col width="20"></col> <col width="50"></col> <col width="80"></col> </colgroup> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> </table>

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor right left center justify char character pixels % number top middle bottom baseline % pixels relative_length Descrio DTD

Define o alinhamento horizontal do contedo da clula STF na coluna da tabela

char charoff span valign

Define um character para usar alinhar texto. (use com STF ="char") Define um alinhamento balanceado para o primeiro caracter Define o nmero de colunas de <col> que se deve medir Define o alinhamento vertical do contedo na clula da cdoluna da tabela. STF STF STF

width

Define a largura da coluna. Nota: O atributo de largura pode ser nulo configurando em <colgroup>

STF

Atributos Padres

UnED Divinpolis Sallum

Prof. William

17

id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <colgroup> tag


Definio e Utilizao
Define grupos de colunas de tabelas. Com este elemento, pode-se agrupar colunas para formatao. Este elemento e vlido somente dentro da tag <table>.

Tipos e Notas
Nota: O elemento colgroup um elemento vazio que contem atributos somente. Para criar colunas, deve-se especificar o elemento td dentro do elemento tr.

Exemplo
Este exemplo cria uma tabela com quarto colunas, com as primeiras trs colunas em um colgroup, e a ltima coluna no Segundo colgroup. Fonte <table border="1"> <colgroup span="3" style="color:#FF0000;"> </colgroup> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> </tr> </table> Sada 1 2 3 4

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor right left center justify char character pixels % number top middle bottom baseline Descrio Define o alinhamento horizontal nos grupos de colunas DTD STF

char charoff span valign

Define um character para ser usado no alinhamento do texto (use com align="char") Define um alinhamento balanceado para o primeiro character Define o nmero de colunas que <colgroup> deve medir Define o alinhamento vertical do contedo do grupo de colunas

STF STF STF STF

UnED Divinpolis Sallum

Prof. William

18

width

% pixels relative_length

Define a largura do grupo de colunas Nota: O atributo de largura pode ser nulo configurando em <col>!

STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <dd> tag


Definio e Utilizao
A tag <dd> define a descrio de um termo na lista de definio.

Exemplo
Fonte <dl> <dt>Caf</dt> <dd>Bebida quente escura</dd> <dt>Leite</dt> <dd>Bebida fria branca</dd> </dl> Sada Caf Leite Bebida quente escura Bebida fria branca

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <del> tag


Definio e Utilizao
Define o texto que foi apagado no documento.

Tipos e Notas
Tipo: Usado juntamente com a tag <ins> para descrever atualizaes e modificaes no documento.

Exemplo
Fonte Uma duzia so <del>20</del> 12 peas Sada Uma dzia so 12 peas

UnED Divinpolis Sallum

Prof. William

19

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo cite datetime Valor URL YYYYMMDD Descrio Define uma URL para outro documento que explica por que o texto foi apagado ou foi inserido Define a data e a hora que o texto foi apagado DTD STF STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <dir> tag


Definio e Utilizao
A tag <dir> define uma lista.

Tipos e Notas
Tipo: Use o stilo CSS para definer o tipo de lista!

Exemplo
Fonte <dir> <li>html</li> <li>xhtml</li> </dir> Sada html xhtml

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onfocus, onblur, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <div> tag


Definio e Utilizao
A tag <div> define uma diviso/seo em um documento.

Exemplo
Fonte Isto um texto Sada Isto um texto

UnED Divinpolis Sallum

Prof. William

20

<div style="color:#FF0000;"> <h4>Este um cabealho em uma seo div </h4> <p>Este um pargrafo em uma seo div</p> </div>

Este um cabealho em uma seo div Este um pargrafo em uma seo div

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor left right center justify Descrio Como alinhar o texto em um elemento div. DTD TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <dl> tag


Definio e Utilizao
A tag <dl> define uma lista de definio.

Exemplo
Fonte <dl> <dt>Caf</dt> <dd>Bebida quente escura</dd> <dt>Leite</dt> <dd>Bebida gelada branca</dd> </dl> Sada Caf Leite Bebida quente escura Bebida gelada branca

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <dt> tag


Definio e Utilizao
A tag <dt> define o incio do termo na lista de definio.

UnED Divinpolis Sallum

Prof. William

21

Exemplo
Fonte <dl> <dt>Caf</dt> <dd>Bebida quente escura</dd> <dt>Leite</dt> <dd>Bebida gelada branca</dd> </dl> Sada Caf Leite Bebida quente escura Bebida gelada branca

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <em> <strong> <dfn> <code> <samp> <kbd> <var> <cite> tags
Definio e Utilizao
Os seguintes elementos so todos os elementos de frases. Com eles possvel alcanar efeitos mais ricos para as folhas de estilo. <em> <strong> <dfn> <code> <samp> <kbd> <var> <cite> Enfatiza texto Enfatiza fortemente texto Define um termo de definio Define texto de cdigo de computador Define exemplo de cdigo de computador Define texto de teclado Define variveis Define citaes

Exemplo
Fonte <em>enfatiza texto</em><br /> <strong>Texto forte</strong><br /> <dfn>Definio de termo</dfn><br /> <code>Texto cdigo de computador </code><br /> <samp>Exemplo texto cdigo comput.</samp><br /> <kbd>Texto de teclado</kbd><br /> <var>varivel</var><br /> <cite>Citao</cite> Sada Enfatiza texto Texto forte Definio de termo

Texto cdigo de computador


Exemplo texto cdigo computador

Texto de teclado
Varivel Citao

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

UnED Divinpolis Sallum

Prof. William

22

TAG <fieldset> tag


Definio e Utilizao
O elemento fieldset desenha uma caixa em torno dos elementos do contedo.

Exemplo
Fonte <fieldset> Altura <input type="text" size="3" /> Largura <input type="text" size="3" /> </fieldset> Sada Altura Largura

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
accesskey, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <font> tag


Definio e Utilizao
A tag <font> especifica a fonte, o seu tamanho e a cor da fonte do texto.

Exemplo
Fonte <font size="3" color="red"> Isto um texto! </font> <font size="1" color="blue"> Isto um texto! </font> <font face="arial" color="red"> Isto um texto! </font> Sada

Isto um texto! Isto um texto! Isto um


texto!

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo color Valor rgb(x,x,x) #xxxxxx colorname Descrio Define a cor do texto do elemento font. DTD TF

UnED Divinpolis Sallum

Prof. William

23

face size

list_of_fontnames

Define a fonte do texto no elemento font.

TF TF

A number from 1 to Define o tamanho do texto no elemento font. 7. If basefont is specified you can specify a number from -6 to 6

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <form> tag


Definio e Utilizao
O elemento form cria um formulrio para entradas. Um formulrio pode conter textfields, checkboxes, radio-buttons e outros objetos. Formulrios so usados para se passer os dados do usurio para uma URL.

Exemplo
Fonte <form action="formuario.asp" method="get"> Nome: <input type="text" name= "nome" value="Jos" /> <br /> Sobrenome: <input type="text" name="sobrenome" value="Silva" /> <br /> <input type="submit" value="Confirma" /> </form> <p> Se clicar no boto Confirma pode-se enviar as entradas para uma nova pgina chamada formulario.asp. </p> Sada Nome.......: sobrenome:

Se clicar no boto Confirma, pode-se enviar as entradas para uma nova pgina chamada formulario.asp.

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo action Valor URL Descrio Uma URL que define onde enviar os dados quando o boto confirma for pressionado DTD STF

Atributos Opcionais
Atributo accept Valor Lista de contenttypes charset_list Descrio Uma lista separada por vrgula contendo tipos que o servidor processa neste formulrio e envia corretamente DTD STF

accept-charset

A lista separada por virgule de possveis conjuntos de STF caracteres para o formulrio de dados. O falor padro "unknown" O tipo de linguagem de sinais usado para codificar o STF

enctype

mimetype

UnED Divinpolis Sallum

Prof. William

24

contedo do formulrio method get post O mtodo HTTP para envio de dados URL. O padro STF get. method="get": Este mtodo envia o contedo do formulrio pela URL: URL?name=value&name=value. Nota: Se os valores do formulrio contem caracteres no-ASCII ou exceder 100 caracteres DEVE-SE usar method="post". method="post": Este mtodo envia o contedo do formulrio para o corpo da pgina requerida. Nota: A maioria dos browsers est desabilitado a pedidos de post. name target form_name _blank _self _parent _top Define um nome nico para o formulrio Onde abrir a URL desejada. TF TF

_blank - a URL desejada se abrir em nova janela _self a URL desejada se abrir na mesma janela em que foi cliclada _parent - a URL desejada se abrir na janela anterior _top a URL desejada se abrir numa janela maximizada

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <frame> tag


Definio e Utilizao
Define uma sub-janela (uma moldura).

Exemplo
Fonte Sada <a href="planetas.htm" target="_blank">Veja o Veja o resultado desta pgina resultado desta pgina</a> O cdigo fonte em "planetas.htm": <html> <frameset cols = "25%, 25%,*"> <frame src ="venus.htm" /> <frame src ="sol.htm" /> <frame src ="mercurio.htm" /> </frameset> </html>

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset.

UnED Divinpolis Sallum

Prof. William

25

Atributo frameborder longdesc

Valor 0 1 URL

Descrio Especifica se mostra ou no a borda ao redor da moldura

DTD F

Uma URL para uma descrio longa dos contedos F das molduras. Usado por browsers que no suportam molduras Define as margens superiors e inferiores de uma moldura Define as margens esquerdas e direitas de uma moldura Define um nome nico para a moldura (a ser usado em scripts) Quando definido como noresize o usurio no pode alterar o tamanho da moldura Determina a barra de rolagem F F F F F

marginheight marginwidth name noresize scrolling

pixels pixels frame_name noresize yes no auto URL

src

Define a URL do arquivo que sera mostrado na moldura

Atributos Padres
Somente permitidos em XHTML 1.0 Frameset DTD!! id, class, title, style

TAG <frameset> tag


Definio e Utilizao
O elemento frameset define um conjunto de molduras. usado para organizer mltiplas janelas. Cada moldura um documento separadamente. Em seu uso mais simples, o elemento de frameset declara quantas colunas ou linhas havero no frameset. Voc tem que usar o atributo cols ou as rows.

Exemplo
Fonte Sada <a href="planetas.htm" target="_blank">Veja o resultado Veja o resultado desta pgina desta pgina</a> O cdigo fonte em "planetas.htm": <html> <frameset cols = "25%, 25%,*"> <frame src ="venus.htm" /> <frame src ="sol.htm" /> <frame src ="mercurio.htm" /> </frameset> </html>

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo cols Valor pixels % Descrio Define o nmero e tamanho de colunas em um frameset DTD F

UnED Divinpolis Sallum

Prof. William

26

* rows pixels % * Define o nmero e tamanho de linhas em um frameset F

TAG <head> tag


Definio e Utilizao
O elemento head pode conter informaes sobre o documento. O browser no mostra o "cabealho de informao " para o usurio. As seguintes tags podem estar na seo do cabealho: <base>, <link>, <meta>, <script>, <style>, and <title>.

Tipos e Notas
Deve-se especificar um ttulo para o documento!

Exemplo
Fonte <html> <head> <title>Ttulo do documento</title> </head> <body> ... ... ... </body> </html>

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo profile Valor URL Descrio A space separated list of URL's that contains meta data information about the page DTD STF

Atributos Padres
dir, lang, xml:lang

TAG <h1> a <h6> tags


Definio e Utilizao
As tags <h1> a <h6> definem cabealhos. <h1> define largo cabealho. <h6> define pequeno header.

UnED Divinpolis Sallum

Prof. William

27

Exemplo
Fonte <h1> <h2> <h3> <h4> <h5> <h6> Este Este Este Este Este Este um um um um um um cabealho cabealho cabealho cabealho cabealho cabealho 1</h1> 2</h2> 3</h3> 4</h4> 5</h5> 6</h6> Sada

Este um cabealho 1
Este um cabealho 2
Este um cabealho 3
Este um cabealho 4
Este um cabealho 5
Este um cabealho 6

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor left center right justify Descrio Especifica o alinhamento do texto no cabealho DTD TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <hr> tag


Definio e Utilizao
A tag <hr> inseri uma linha horizontal.

Exemplo
Fonte Isto um texto <hr /> Isto um texto Sada Isto um texto Isto um texto

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor center left right noshade Descrio Specifies the alignment of the horizontal rule. Deprecated. Use styles instead When set to true the rule should render in a solid color, when set to false the rule should render in a two-color "groove". Deprecated. Use styles instead DTD TF

noshade

TF

size width

pixels % pixels

Specifies the thickness (height) of the horizontal rule. TF Deprecated. Use styles instead Specifies the width of the horizontal rule Deprecated. TF

UnED Divinpolis Sallum

Prof. William

28

Use styles instead

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <html> tag


Definio e Utilizao
Estes elementos informam ao browser que este um documento HTML.

Exemplo
<html> <head> </head> <body> ... ... ... </body> </html>

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo xmlns Valor Descrio DTD STF

http://www.w3.org/1999/xhtml Defines the XML namespace attribute

Atributos Padres
dir, lang, xml:lang

TAG <iframe> tag


Definio e Utilizao
O elemento iframe cria em uma janela um outro documento.

Exemplo
Fonte <iframe src ="/default.asp" width="100%"> </iframe> Sada

UnED Divinpolis Sallum

Prof. William

29

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor left right top middle bottom 1 0 pixels % URL pixels pixels frame_name yes no auto URL pixels % Descrio Especifica como alinhar o iframe em torno do texto DTD TF

frameborder height longdesc marginheight marginwidth name scrolling

Especifica se mostra ou no a borda da janela Define a altura do iframe

TF TF

Uma URL para uma grande descrio do conteudo do TF da janela Define as margens superiors e inferiors do iframe Define as magens direita e esquerda do iframe TF TF

Especifica um nome nico para o iframe (para uso em TF scripts) Define brarra de rolagem TF

src width

A URL do documento mostrado no iframe Define a largura do iframe

TF TF

Atributos Padres
id, class, title, style

TAG <img> tag


Definio e Utilizao
O elemeno img define uma imagem.

Exemplo
Fonte <img src="irado.gif" alt="Irado" /> Sada

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo alt src Valor text URL Descrio Define uma pequena definio para a imagem A URL da imagem para exibir DTD STF STF

Atributos Opcionais
Atributo align Valor top bottom Descrio Especifica o alinhamento do imagem em torno do texto. DTD TF

UnED Divinpolis Sallum

Prof. William

30

middle left right border height hspace ismap longdesc usemap pixels pixels % pixels URL URL URL Define uma borda em torno da imagem Define a altura de uma imagem Define espaos em branco dos lados direito e esquerdo da imagem. Define a imagem como um mapa de imagem de do lado do servidor Uma URL para um documento que contem uma grande descrio da imagem. TF STF TF STF STF

Define a imagem como um mapa de imagem do lado STF do cliente. Visualiza as tags <map> e <area> para delinear o trabalho. Define espaos em branco no topo e no rodap da imagem. Configura a largura de uma imagem. TF STF

vspace width

pixels pixels %

Atributos Padres
id, class, title, style, lang, xml:lang

TAG <input> tag


Definio e Utilizao
A tag <input> define o incio de um campo de entrada onde o usurio pode entrar com dados.

Tipos e Notas
Nota: O elemento input vazio e contem somente atributos. Tipo: Use o elemento label para definer um rtulo para o controle de formulrio.

Exemplo
Fonte <form action="formulario.asp" method="get"> Nome: <input type="text" name="nome" value="Jos" /> <br /> Sobrenome: <input type="text" name="sobrenome" value="Silva" /> <br /> <input type="submit" value="confirma" /> </form> <p> Se voc cliclar no boto Confirma, Voc enviar a entrada para uma nova pgina denominada formulario.asp. </p> Sada Nome: Sobrenome:

Se voc cliclar no boto Confirma, Voc enviar a entrada para uma nova pgina denominada formulario.asp.

UnED Divinpolis Sallum

Prof. William

31

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo accept Valor list_of_mime_types Descrio Uma lista separada por vruglas do tipo MIME que indica o tipo de arquivo de transferncia Nota: Usado somente com type="file" align left right top texttop middle absmiddle baseline bottom absbottom text Define o alinhamento do texto que segue a imagem. Nota: Usado somente com type="image" TF DTD STF

alt

Define um texto alternative para a imagem. Nota: Usado somente com type="image"

STF

checked

checked

Indica qual o elemento de entrada deve ser verificado STF na primeira carga. Nota: Usado com type="checkbox" e type="radio"

disabled

disabled

Disabilita o elemento de entrada quando da primeira de modo a impossbilitar ao usurio selecionar ou alterar. Nota: No pode ser usado com type="hidden"

STF

maxlength

number

Defines the maximum number of characters allowed in a text field. Nota: usado somente com type="text"

STF

name

field_name

Define um nome nico para o elemento de entrada. Nota: Este atributo requerido com type="button", type="checkbox", type="file", type="hidden", type="image", type="password", type="text", e type="radio"

STF

readonly

readonly

Indica que o valor deste campo no pode ser modificado. Nota: Usado somente com type="text"

STF

size

number_of_char

Define o tamanho do elemento de entrada. Nota: Cannot be used with type="hidden"

STF

src

URL

Define a URL da imagem de exibio. Nota: Usado somente com type="image"

STF

type

button checkbox file hidden image password radio reset

Indica o tipo do elemento de entrada. O valor padro STF "text"

UnED Divinpolis Sallum

Prof. William

32

submit text value value Para buttons, reset buttons e submit buttons: Define o texto no boto. Para image buttons: Define o resultado simblico do campo passado para um script. para checkboxes e radio buttons: define o resultado do elemento de entrada quando clicado. O resultado enviado para URL de formurio. Para hidden, password, e text fields: Define o valor padro do elemento. Nota: No pode ser usado com type="file" Nota: Este atributo requerido com type="checkbox" e type="radio" STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
tabindex, accesskey, onfocus, onblur, onselect, onchange, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <ins> tag


Definio e Utilizao
Define a insero de um texto.

Tipos e Notas
Tipo: Use este juntamente com a teag <del> para descrever atualizaes e modificaes para um documento.

Exemplo
Fonte a dozen is <del>20</del> <ins>12</ins> pieces! Sada a dozen is 12 pieces!

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo cite datetime Valor URL YYYYMMDD Descrio DTD

Uma URL para outro documento que explica o porque STF o texto foi inserido. Define a data e hota que o texto foi inserido. STF

Atributos Padres

UnED Divinpolis Sallum

Prof. William

33

id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <label> tag


Definio e Utilizao
Define um rtulo para um controle.

Tipos e Notas
Nota: O atributo "for" atribui um rtulo a um outro elemento. Configure o valor do atributo "for" igual ao valor do atributo "id" do respective elemento.

Exemplo
Fonte Sada <p>Teste clicando nos rtulos de texto:</p> Teste clicando nos rtulos de texto: <form name="input" action=""> Macho <input type="radio" name="sexo" Fmea id="macho" /> <label for="macho">Macho</label> <br /> <input type="radio" name="sexo" id="femea" /> <label for="femea">Fmea</label> </form>

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo for Valor Descrio DTD STF

id_of_another_field Define qual elemento do formulrio o rtulo for. Configura um ID de um elemento do formulrio. Nota: Se este atributo no especificado, o rtulo associado com seus contedos.

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
accesskey, onfocus, onblur, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <legend> tag


Definio e Utilizao

UnED Divinpolis Sallum

Prof. William

34

O elemento legend define um ttulo para o campo de configurao.

Exemplo
Fonte <fieldset> <legend>Informao:</legend> Altura: <input type="text" size="3" /> Peso: <input type="text" size="3" /> </fieldset> Sada Informao: Altura: Peso:

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor top bottom left right Descrio Determina o alinhamento para o contedo do campo de configurao. Alinhamento no topo o padro. DTD TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
accesskey, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <li> tag


Definio e Utilizao
A tag <li> define o incio de uma listagem de itens. A tag <li> usada como lista numerada ou no numerada (<ul>).

Tipos e Notas
Tip: Utilize styles para definer o tipo de lista.

Exemplos
Fonte <ol> <li>Caf</li> <li>Ch</li> </ol> <ul> <li>Caf</li> <li>Ch</li> </ul> Sada

1.
2.

Caf C Caf Ch

Atributos Opcionais

UnED Divinpolis Sallum

Prof. William

35

DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo type Valor A a I i 1 disc square circle Descrio Especifica o tipo de lista. DTD TF

value

number_of_list_item Valor

TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <link> tag


Definio e Utilizao
Este elemento define o relacionamento entre dois documentos linkados.

Tipos e Notas
Nota: O elemento link um elemento vazio, ele contem somente atributos. Nota: Este elemento s paparece no cabealho mas pode aparecer qualquer nmero de vezes.

Exemplo
Como utilizar a tag <link> para ligar a uma folha de estilo externa: <head> <link rel="stylesheet" type="text/css" href="theme.css" /> </head>

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo charset href Valor charset URL Descrio DTD

Define a codificao dos caracteres da URL destino. O STF valor padro "ISO-8859-1" A URL destino. STF

UnED Divinpolis Sallum

Prof. William

36

hreflang media

language_code screen tty tv projection handheld print braille aural all

Define a linguagem para a URL destino. Especifica em qual dispositivo o documento sera mostrado. screen tty Para um computador de tela no paginada. Para dispositivos de pontos fixos tipo character a character (como teletipos, terminais, ou dispositivos com capacidade de visualizao limitada) Para um dispositivo do tipo TV (baixa resoluo e limitada varredura de tela)

STF STF

tv

projection Para projetores handheld Para dispositivos portteis (tela pequena) e.x.: Palmtop print braille aural all rel alternate appendix bookmark chapter contents copyright glossary help home index next prev section start stylesheet subsection alternate appendix bookmark chapter contents copyright glossary help home index next prev section start stylesheet subsection _blank _self _top _parent Para pr-visializao de documentos a serem impressos. Para dispositivos de cdigo Braille. Para sintetizadores de voz. For all devices

Define o relacionamento entre o documento atural e o STF documento destino.

rev

Define o relacionamento entre o documento destino e STF o documento atual.

target

Como abrir a URL destino.

TF

_blank a URL destino sera apberta em uma nova janela _self a URL destino ser aberta na mesma janela em que foi clicada. _parent a URL destino sera aberta na janela chamadora _top a URL destino sera aberta em janela

UnED Divinpolis Sallum

Prof. William

37

cheia type MIME_type like: text/css text/javascript image/gif Especifica o tipo MIME da URL destino STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <map> tag


Definio e Utilizao
Define o mapa de imagem do lado do cliente. Um mapa de imagem uma imagem com regies clicveis.

Tipos e Notas
Nota: A area do elemeno est sempre contido dentro do mapeamento. A rea do elemento define a regio do mapa de imagem. Nota: O atributo usemap em <img> referencia o atributo id ou o atributo name (dependente do browser) em <map>, ento nos aldicionamos os atributosd id e name ao <map>.

Exemplo
Fonte <p>Click em um dos planetas:</p> <img src ="planetas.gif" width ="145" height ="126" alt="Planetas" usemap ="#planetmap" /> <map id ="planetmap" name="planetmap"> <area shape ="rect" coords ="0,0,82,126" href ="sol.htm" target ="_blank" alt="Sol" /> <area shape ="circle" coords ="90,58,3" href ="mercurio.htm" target ="_blank" alt="Mercurio" /> <area shape ="circle" coords ="124,58,8" href ="venus.htm" target ="_blank" alt="Venus" /> </map> Sada Click em um dos planetas:

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset.

UnED Divinpolis Sallum

Prof. William

38

Atributo id

Valor unique_name

Descrio Define uma nica identificao para a tag map

DTD STF

Atributos Opcionais
Atributo name Valor unique_name Descrio Define um nico nome para a tag map DTD STF

Atributos Padres
class, title, style, dir, lang, xml:lang

Atributos Eventuais
tabindex, accesskey, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, onfocus, onblur

TAG <menu> tag


Definio e Utilizao
A tag <menu> defines uma lista de menu.

Tipos e Notas
Tip: Utilize estilos CSS para definer o tipo de lista!

Exemplo
Fonte <menu> <li>html</li> <li>xhtml</li> </menu> Sada html xhtml

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset.

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onfocus, onblur, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <meta> tag


UnED Divinpolis Sallum Prof. William 39

Definio e Utilizao
O elemento <meta> fornece meta-informaes sobre sua pgina, assim como descries e palavras chaves para mecanismos de pesquisa.

Tipos e Notas
Nota: A tag <meta> sempre entra no elemento de cabealho. Nota: Metadata sempre passado como name/value.

Exemplos
Define keywords for search engines: <meta name="keywords" content="HTML, DHTML, CSS, XML, XHTML, JavaScript, VBScript" /> Define uma descrio0 de da pgina web: <meta name="descrio" content="tutorial Web gratuito em HTML, CSS, XML e XHTML" /> Define a ltima verso da pgina: <meta name="revisado" content="Reviso em, 6/10/99" /> Atualiza a pgina a cada 5 minutos: <meta http-equiv="refresh" content="5" />

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo content Valor some_text Descrio Define a informao meta a ser associada com httpequiv ou name DTD STF

Atributos Opcionais
Atributo http-equiv Valor content-type expires refresh set-cookie author description keywords generator revised others some_text Descrio Conecta o atribuito content ao cabealho HTTP DTD STF

name

Conecta o atributo content ao name

STF

scheme

Define um formato a ser usado para interpretar o valor do atributo content

STF

Atributos Padres
dir, lang, xml:lang

TAG <noframes> tag


Definio e Utilizao

UnED Divinpolis Sallum

Prof. William

40

O elemento noframes mostra texto em browsers que no manipula frames. O elemento noframes se encontra no elemento frameset.

Tipos e Notas
Nota: Se um browser manipula frames,ele no mostrar o texto no elemento noframes. Importante: Se adicionar a tag <noframes> a um frameset, voc ter que incluir o texto entre as tags <body></body>

Exemplo
<frameset cols = "25%, 25%,*"> <noframes> <body>Your browser does not handle frames!</body> </noframes> <frame src ="venus.htm" /> <frame src ="sun.htm" /> <frame src ="mercur.htm" /> </frameset>

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
No h.

TAG <noscript> tag


Definio e Utilizao
O elemento noscript usado para definer um contedo (texto) alternativo se um escript NO executado. Esta tag utilizada por browsers que reconhecem a tag <script>, mas no suportam o script nela.

Tipos e Notas
Nota: Se um browser suporta scripting, ele no mostrar o texto no elemento noscript. Nota: Browsers que no reconhecem a tag <script> mostrar contedos de tag's conmo texto na pgina. Para prevenir o browser de fazer isto, deve-se esconder o script em tags de comentrio. Um browser antigo (um que no reconhece a tag <script>) ignorar o comentrio e na escrever o contedo das tags na pgina, enquanto um novo browser no entender que o script dever ser executado, at mesmo se cercado por tags de comentrios!

Exemplos
JavaScript: <body> ... ... <script type="text/javascript"> <!-document.write("Al Mundo!")

UnED Divinpolis Sallum

Prof. William

41

//--> </script> <noscript>Seu browser no suporta JavaScript!</noscript> ... ... </body> VBScript: <body> ... ... <script type="text/vbscript"> <!-document.write("Al Mundo!") '--> </script> <noscript> Seu browser no suporta VBScript!</noscript> ... ... </body>

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
No h.

TAG <object> tag


Definio e Utilizao
Define um objeto embutido. Usa-se este elemento para adicionar multimdia as pginas XHTML. Este elemento permite escificar os dados e parmetros dos objetos iseridos em documentos HTML, e o cdigo que pode ser utilizado para mostrar/manipular estes dados.

Tipos e Notas
Nota: Um elemento object pode aparecer em cabealhos ou corpos. Os textos entre <object> e </object> so textos alternativos, para browsers que no suportam esta tag. As tags <param> definem configuraes run-time para o objeto. Tipo: Para imagens usa-se a tag <img> ao invs da tag <object>.

Exemplo
Fonte <object classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" id="Slider1" width="100" height="50"> <param name="BorderStyle" value="1" /> <param name="MousePointer" value="0" /> <param name="Enabled" value="1" /> <param name="Min" value="0" /> <param name="Max" value="10" /> </object> Sada

Atributos Opcionais

UnED Divinpolis Sallum

Prof. William

42

DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor left right top bottom URL Descrio Define o alinhamento do textoem torno do objeto DTD TF

archive

Um espao separado para lista de URLs para arquivos. Os arquivos contem recursos relevantes para o objeto. Define uma borda em torno do objeto Define um valor de uma classe ID como configurado no registro do windows ou URL Determina onde localizer o cdigo para o objeto O tipo de mdia internet co cdigo referenciado pelo atributo de classe Define a URL que refere-se aos dados do objeto

STF

border classid codebase codetype data declare height hspace name standby type usemap vspace width

pixels class ID URL MIME type URL declare pixels pixels unique_name text MIME_type URL pixels pixels

TF STF STF STF STF

Define que o objeto deve ser declarado, no criado ou STF instanciado Define a altura do objeto Define o espaamento horizontal em torno do objeto STF TF

Define um nome nico para o objeto (para ser usado STF em scripts) Define um texto a ser mostrado enquanto o objeto carregado STF

Define o tipo MIME de dados especificados no atributo STF data Especifica uma URL do mapa de imagens lado do cliente a ser usado com o objeto Define o espaamento vertical em torno do objeto Define a lagura do objeto STF TF STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
accesskey, tabindex, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <ol> tag


Definio e Utilizao
A tag <ol> define o incio de uma lista numerada.

Tipos e Notas
Tipo: Usa-se styles para definer o tipo de lista.

Exemplo
Fonte <ol> <li>Caf</li> <li>Ch</li> Sada

1.

Caf

UnED Divinpolis Sallum

Prof. William

43

</ol> 2. Ch

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo start type Valor start_on_number A a I i 1 Descrio Especifica o nmero de incio. Especifica o tipo da lista. DTD TF TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <optgroup> tag


Definio e Utilizao
Determina um grupo de opes. Este elemento permite agrupar opes. Quando se tem uma lista longa de opes,When you have a long list of options, grupo de opes relacionadas so mais fceis de manipular.

Exemplo
Fonte <select> <optgroup label="Escolas Federais"> <option value ="CEFETMG">cefetmg</option> <option value ="UFMG">ufmg</option> </optgroup> <optgroup label="Escolas Particulares"> <option value ="FUMEC">fumec</option> <option value ="UNA">una</option> </optgroup> </select> Sada

Atributos Requeridos
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo label Valor text_label Descrio Define o rtulo para o grupo de opes DTD STF

Atributos Opcionais

UnED Divinpolis Sallum

Prof. William

44

Atributo disabled

Valor disabled

Descrio

DTD

Desabilita o rupo de opes quando feita a primeira STF carga

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
tabindex, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <option> tag


Definio e Utilizao
O elemento option define uma opo da lista suspensa de opes.

Tipos e Notas
Nota: A tag<option> pode ser usada sem qualquer opo, mas usualmente necessita do atributo value, que indica o que enviado para o servidor.

Exemplo
Fonte <select> <option value <option value <option value <option value </select> ="FUMEC">fumec </option> ="UFMG">ufmg</option> ="CEFETMG" selected="selected"> cefetmg </option> ="UNA">una</option> Sada

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo disabled label selected value Valor disabled text selected text Descrio Especifica que a opo deve ser desabilitada quando da primeira carga Define um rtulo quando usar <optgroup> Especifica que a opo deve aparecer j selecionada (Ser mostrada como primeira na lista) Define o valor da opo a ser enviada ao servidor DTD STF STF STF STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang, tabindex

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

UnED Divinpolis Sallum

Prof. William

45

TAG <p> tag


Definio e Utilizao
A tag <p> define um pargrafo.

Exemplo
Fonte <p>Isto um texto em um pequeno pargrafo</p> Sada Isto um texto em um pequeno pargrafo

Atributos Opcionais
DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo align Valor left right center justify Descrio Especifica o alinhamento do texto no pargrafo. DTD TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <pre> tag


Definio e Utilizao
O elemento pre define textos pr-formatados. O texto dentro do elemento pre usualmente preserva os espaos e as linhas de parade. O texto se torna um ponto fixo.

Exemplo
Fonte <pre> Este texto est com fonte fixada e todos linhas tambm esto. </pre> Sada Este texto est com fonte fixada e todos linhas tambm esto.

seus espaos e

seus espaos e

Atributos Opcionais

UnED Divinpolis Sallum

Prof. William

46

DTD indica em qual DTD que o atributo permitido. S=Strict, T=Transitional, e F=Frameset. Atributo width Valor number Descrio Define o nmero mximo de caracteres por linha (usualmente 40, 80, ou 132) DTD TF

Atributos Padres
id, class, title, style, dir, lang, xml:lang, xml:space

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <q> tag


Definio e Utilizao
The <q> tag defines the start of a short quotation.

Differences Between HTML and XHTML


NONE

Tipos e Notas
Nota: According to the HTML 4.01 spec, the q element should render with delimiting quotation marks. This works in Mozilla browsers (Firefox) and Opera. Internet Explorer ignores this entirely.

Exemplo
Fonte Sada Here comes a short quotation: Here comes a short quotation: here is a short quotation <q>here is a short quotation here is a here is a short quotation short quotation</q>

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo cite Valor citation Descrio Defines a citation for the quotation DTD STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

UnED Divinpolis Sallum

Prof. William

47

TAG <s> and <strike> tags


Definio e Utilizao
The <s> and <strike> tags defines strikethrough text.

Differences Between HTML and XHTML


The <s> and <strike> elements were deprecated in HTML 4.01. The <s> and <strike> elements are not supported in XHTML 1.0 Strict DTD.

Tipos e Notas
Tip: Use <del> instead!

Exemplo
Fonte Sada A new version is <s>not yet available.</s> now A new version is not yet available. now available! available! <br /> A new version is not yet available. now available! <br /> A new version is <strike>not yet available.</strike> now available!

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <script> tag


Definio e Utilizao
Defines a script, such as a JavaScript.

Differences Between HTML and XHTML


The "language" attribute of the script element was deprecated in HTML 4.01. The "language" attribute of the script element is not supported in XHTML 1.0 Strict DTD.

Tipos e Notas

UnED Divinpolis Sallum

Prof. William

48

Nota: Code within this element is executed immediately when the page is loaded, if it is not in a function. Script that appears after a <frameset> tag will be ignored.

Exemplo
Fonte <script type="text/javascript"> document.write("Hello World!") </script> Sada Hello World!

Atributos Requeridos
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo type Valor text/ecmascript text/javascript application/ecmascript application/javascript text/vbscript Descrio Indicates the MIME type of the script DTD STF

Atributos Opcionais
Atributo charset defer Valor charset defer Descrio Defines the character encoding used in script DTD STF

Indicates that the script is not going to generate any STF document content. The browser can continue parsing and drawing the page Specifies the scripting language. Deprecated. Use the TF type attribute instead.

language

javascript livescript vbscript other URL

src

Defines a URL to a file that contains the script (instead of inserting the script into your HTML document, you can refer to a file that contains the script)

STF

Atributos Padres
xml:space For a full description, go to Atributos Padres.

Atributos Eventuais
NONE

TAG <select> tag


Definio e Utilizao
The select element creates a drop-down list.

Differences Between HTML and XHTML


NONE

UnED Divinpolis Sallum

Prof. William

49

Tipos e Notas
Tip: Use this tag in the form element to accept user input.

Exemplo
Fonte <select> <option value <option value <option value <option value </select> ="volvo">Volvo</option> ="saab">Saab</option> ="opel">Opel</option> ="audi">Audi</option> Sada

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo disabled multiple name size Valor disabled multiple unique_name number Descrio When set, it disables the drop-down list When set, it specifies that multiple items can be selected at a time Defines a unique name for the drop-down list DTD STF STF STF

Defines the number of visible items in the drop-down STF list

Atributos Padres
id, class, title, style, dir, lang, xml:lang, accesskey, tabindex For a full description, go to Atributos Padres.

Atributos Eventuais
onfocus, onblur, onchange For a full description, go to Atributos Eventuais.

TAG <span> tag


Definio e Utilizao
The <span> tag is used to group inline-elements in a document.

Differences Between HTML and XHTML


NONE

Tipos e Notas
Tip: Use the <span> tag to group inline-elements to format them with styles

Exemplo

UnED Divinpolis Sallum

Prof. William

50

Fonte <p>This is a paragraph <span style="color:#0000FF;">This is a paragraph</span> This is a paragraph</p> <p> <span style="color:#00DD45;"> This is another paragraph </span> </p>

Sada This is a paragraph This is a paragraph This is a paragraph This is another paragraph

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <style> tag


Definio e Utilizao
Defines a style in a document. The style element goes in the head section. If you want to include a style sheet in your page, you should define the style sheet externally, and link to it using <link>.

Differences Between HTML and XHTML


NONE

Tipos e Notas
Tip: To learn more about style sheets, visit our CSS Tutorial.

Exemplo
Fonte <head> <style type="text/css"> h1 {color: red} h3 {color: blue} </style> </head>

Atributos Requeridos
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo Valor Descrio DTD

UnED Divinpolis Sallum

Prof. William

51

type

text/css

Defines the content-type

STF

Atributos Opcionais
Atributo media Valor screen tty tv projection handheld print braille aural all Descrio The destination medium for the style information DTD STF

Atributos Padres
title, dir, lang, xml:space

TAG <sub> and <sup> tags


Definio e Utilizao
The <sub> tag defines subscript text. The <sup> tag defines superscript text.

Differences Between HTML and XHTML


NONE

Exemplo
Fonte This text contains <sub>subscript</sub> This text contains <sup>superscript</sup> Sada This text contains This text contains
subscript superscript

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <table> tag


Definio e Utilizao
The <table> tag defines a table. Inside a <table> tag you can put table headers, table rows, table cells, and other tables.

UnED Divinpolis Sallum

Prof. William

52

Differences Between HTML and XHTML


The "align" and "bgcolor" attributes of the table element were deprecated in HTML 4.01. The "align" and "bgcolor" attributes of the table element are not supported in XHTML 1.0 Strict DTD.

Exemplo
Fonte <table border = "1"> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> Sada Cell A Cell B

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo align Valor left center right rgb(x,x,x) #xxxxxx colorname pixels Descrio Aligns the table. Deprecated. Use styles instead. DTD TF

bgcolor

Specifies the background color of the table. Deprecated. Use styles instead. Specifies the border width. Tip: Set border="0" to display tables with no borders!

TF

border

STF

cellpadding cellspacing frame

pixels % pixels % void above below hsides lhs rhs vsides box border none groups rows cols all text % pixels

Specifies the space between the cell walls and contents Specifies the space between cells

STF STF

Specifies how the outer borders should be displayed. STF Nota: Must be used in conjunction with the "border" attribute!

rules

Specifies the horizontal/vertical divider lines. Nota: Must be used in conjunction with the "border" attribute! Specifies a summary of the table for speechsynthesizing/non-visual browsers Specifies the width of the table

STF

summary width

STF STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <tbody> tag


UnED Divinpolis Sallum Prof. William 53

Definio e Utilizao
Defines a table body. The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom. This division enables browsers to support scrolling of table bodies independently of the table header and footer. When long tables are printed, the table header and footer information may be repeated on each page that contains table data.

Differences Between HTML and XHTML


NONE

Tipos e Notas
Nota: The <tbody> must have a <tr> tag inside! Nota: If you use the thead, tfoot and tbody elements, you must use every element. They should appear in this order: <thead>, <tfoot> and <tbody>, so that browsers can render the foot before receiving all the data. You must use these tags within the table element. Nota: The <thead>,<tbody> and <tfoot> elements are seldom used, because of bad browser support. Expect this to change in future versions of XHTML. If you have Internet Explorer 5.0 or newer, you can view an examplo in our XML tutorial.

Exemplo
Fonte <table border = "1"> <thead> <tr> <td>This text is in the THEAD</td> </tr> </thead> <tfoot> <tr> <td>This text is in the TFOOT</td> </tr> </tfoot> <tbody> <tr> <td> This text is in the TBODY</td> </tr> </tbody> </table> Sada This text is in the THEAD This text is in the TFOOT This text is in the TBODY

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo align Valor right left center justify char character Descrio Defines the text alignment in cells DTD STF

char

Specifies which character to align text on.

STF

UnED Divinpolis Sallum

Prof. William

54

Nota: Only used if align="char"! charoff pixels % Specifies the alignment offset to the first character to STF align on. Nota: Only used if align="char"! valign top middle bottom baseline Specifies the vertical text alignment in cells STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <td> tag


Definio e Utilizao
Defines a cell in a table.

Differences Between HTML and XHTML


The "bgcolor", "height", "width", and "nowrap" attributes of the td element were deprecated in HTML 4.01. The "bgcolor", "height", "width", and "nowrap" attributes of the td element are not supported in XHTML 1.0 Strict DTD.

Exemplo
Fonte <table border = "1"> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> Sada Cell A Cell B

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo abbr align Valor abbr_text left right center Descrio Specifies an abbreviated version of the content in a cell Specifies the horizontal alignment of cell content DTD STF STF

UnED Divinpolis Sallum

Prof. William

55

justify char axis bgcolor category_names rgb(x,x,x) #xxxxxx colorname character Defines a name for a cell Specifies the background color of the table cell. Deprecated. Use styles instead. Specifies which character to align text on. Nota: Only used if align="char"! charoff pixels % Specifies the alignment offset to the first character to STF align on. Nota: Only used if align="char"! colspan headers number header_cells'_id Indicates the number of columns this cell should span STF A space-separated list of cell IDs that supply header STF information for the cell. This attribute allows text-only browsers to render the header information for a given cell Specifies the height of the table cell. Deprecated. Use TF styles instead. Whether to disable or enable automatic text wrapping TF in this cell. Deprecated. Use styles instead. Indicates the number of rows this cell should span Specifies if this cell provides header information for the rest of the row that contains it (row), or for the rest of the column (col), or for the rest of the row group that contains it (rowgroup), or for the rest of the column group that contains it Specifies the vertical alignment of cell content STF STF STF TF

char

STF

height nowrap rowspan scope

pixels nowrap number col colgroup row rowgroup top middle bottom baseline pixels %

valign

STF

width

Specifies the width of the table cell. Deprecated. Use TF styles instead.

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <textarea> tag


Definio e Utilizao
Defines a text-area (a multi-line text input control). A user can write text in the text-area. In a text-area you can write an unlimited number of characters. The default font in the text-area is fixed pitch.

Differences Between HTML and XHTML


NONE

UnED Divinpolis Sallum

Prof. William

56

Exemplo
Fonte <textarea rows="2" cols="20"> The cat was playing in the garden. Suddenly a dog showed up..... </textarea> Sada

Atributos Requeridos
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo cols rows Valor number number Descrio Specifies the number of columns visible in the textarea Specifies the number of rows visible in the text-area DTD STF STF

Atributos Opcionais
Atributo disabled name readonly Valor disabled name_of_textarea readonly Descrio Disables the text-area when it is first displayed Specifies a name for the text-area Indicates that the user cannot modify the content in the text-area DTD STF STF STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang, tabindex, accesskey For a full description, go to Atributos Padres.

Atributos Eventuais
onfocus, onblur, onselect, onchange, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <tfoot> tag


Definio e Utilizao
Defines a table footer. The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom. This division enables browsers to support scrolling of table bodies independently of the table header and footer. When long tables are printed, the table header and footer information may be repeated on each page that contains table data.

Differences Between HTML and XHTML


NONE

Tipos e Notas
Nota: The <tfoot> must have a <tr> tag inside!

UnED Divinpolis Sallum

Prof. William

57

Nota: If you use the thead, tfoot and tbody elements, you must use every element. They should appear in this order: <thead>, <tfoot> and <tbody>, so that browsers can render the foot before receiving all the data. You must use these tags within the table element. Nota: The <thead>,<tbody> and <tfoot> elements are seldom used, because of bad browser support. Expect this to change in future versions of XHTML. If you have Internet Explorer 5.0 or newer, you can view an examplo in our XML tutorial.

Exemplos
Fonte <table border = <thead> <tr> <td>This text is </tr> </thead> <tfoot> <tr> <td>This text is </tr> </tfoot> <tbody> <tr> <td>This text is </tr> </tbody> </table> "1"> in the THEAD</td> Sada This text is in the THEAD This text is in the TFOOT This text is in the TBODY

in the TFOOT</td>

in the TBODY</td>

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo align Valor right left center justify char character Descrio Defines the text alignment in cells DTD STF

char

Specifies which character to align text on. Nota: Only used if align="char"!

STF

charoff

pixels %

Specifies the alignment offset to the first character to STF align on. Nota: Only used if align="char"!

valign

top middle bottom baseline

Specifies the vertical text alignment in cells

STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout,

UnED Divinpolis Sallum

Prof. William

58

onkeypress, onkeydown, onkeyup

TAG <th> tag


Definio e Utilizao
Defines a table header cell in a table. The text within the th element usually renders in bold.

Differences Between HTML and XHTML


The "bgcolor", "height", "width", and "nowrap" attributes of the th element were deprecated in HTML 4.01. The "bgcolor", "height", "width", and "nowrap" attributes of the th element are not supported in XHTML 1.0 Strict DTD.

Exemplo
Fonte <table border = "1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> Sada Header 1 Header 2 Cell A Cell B

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo abbr align Valor abbr_text left right center justify char category_names rgb(x,x,x) #xxxxxx colorname character Descrio Specifies an abbreviated version of the content in a cell Specifies the horizontal alignment of cell content DTD STF STF

axis bgcolor

Defines a name for a cell Specifies the background color of the table cell. Deprecated. Use styles instead. Specifies which character to align text on. Nota: Only used if align="char"!

STF TF

char

STF

charoff

pixels %

Specifies the alignment offset to the first character to STF align on. Nota: Only used if align="char"!

colspan headers

number header_cells'_id

Indicates the number of columns this cell should span STF A space-separated list of cell IDs that supply header STF information for the cell. This attribute allows text-only

UnED Divinpolis Sallum

Prof. William

59

browsers to render the header information for a given cell height nowrap rowspan scope pixels nowrap number col colgroup row rowgroup top middle bottom baseline pixels % Specifies the height of the table cell. Deprecated. Use TF styles instead. Whether to disable or enable automatic text wrapping TF in this cell. Deprecated. Use styles instead. Indicates the number of rows this cell should span Specifies if this cell provides header information for the rest of the row that contains it (row), or for the rest of the column (col), or for the rest of the row group that contains it (rowgroup), or for the rest of the column group that contains it Specifies the vertical alignment of cell content STF STF

valign

STF

width

Specifies the width of the table cell. Deprecated. Use TF styles instead.

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <thead> tag


Definio e Utilizao
Defines a table header. The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom. This division enables browsers to support scrolling of table bodies independently of the table header and footer. When long tables are printed, the table header and footer information may be repeated on each page that contains table data.

Differences Between HTML and XHTML


NONE

Tipos e Notas
Nota: The <thead> must have a <tr> tag inside! Nota: If you use the thead, tfoot and tbody elements, you must use every element. They should appear in this order: <thead>, <tfoot> and <tbody>, so that browsers can render the foot before receiving all the data. You must use these tags within the table element. Nota: The <thead>,<tbody> and <tfoot> elements are seldom used, because of bad browser support. Expect this to change in future versions of XHTML. If you have Internet Explorer 5.0 or newer, you can view an examplo in our XML tutorial.

UnED Divinpolis Sallum

Prof. William

60

Exemplo
Fonte <table border = <thead> <tr> <td>This text is </tr> </thead> <tfoot> <tr> <td>This text is </tr> </tfoot> <tbody> <tr> <td>This text is </tr> </tbody> </table> "1"> in the THEAD</td> Sada This text is in the THEAD This text is in the TFOOT This text is in the TBODY

in the TFOOT</td>

in the TBODY</td>

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo align Valor right left center justify char character Descrio Defines the text alignment in cells DTD STF

char

Specifies which character to align text on. Nota: Only used if align="char"!

STF

charoff

pixels %

Specifies the alignment offset to the first character to STF align on. Nota: Only used if align="char"!

valign

top middle bottom baseline

Specifies the vertical text alignment in cells

STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

TAG <title> tag


Definio e Utilizao
This element defines the title of the document.

UnED Divinpolis Sallum

Prof. William

61

Differences Between HTML and XHTML


NONE

Exemplo
<html> <head> <title>XHTML Tag Reference</title> </head> <body> The content of the document...... </body> </html>

Atributos Padres
id, class, dir, lang, style, xml:lang

TAG <tr> tag


Definio e Utilizao
Defines a row in a table.

Differences Between HTML and XHTML


The "bgcolor" attribute of the tr element were deprecated in HTML 4.01. The "bgcolor" attribute of the tr element are not supported in XHTML 1.0 Strict DTD.

Exemplo
Fonte <table border = "1"> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </table> Sada Cell A Cell B

Atributos Opcionais
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo align Valor right left center justify char Descrio Defines the text alignment in cells DTD STF

UnED Divinpolis Sallum

Prof. William

62

bgcolor

rgb(x,x,x) #xxxxxx colorname character

Specifies the background color of the table cell. Deprecated. Use styles instead. Specifies which character to align text on. Nota: Only used if align="char"!

TF

char

STF

charoff

pixels %

Specifies the alignment offset to the first character to STF align on. Nota: Only used if align="char"!

valign

top middle bottom baseline

Specifies the vertical text alignment in cells

STF

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <tt> <i> <b> <big> <small> tags


Definio e Utilizao
The following elements are all font style elements. They are not deprecated, but it is possible to achieve richer effects using style sheets. <tt> <i> <b> <big> <small> Renders as teletype or mono spaced text Renders as italic text Renders as bold text Renders as bigger text Renders as smaller text

Differences Between HTML and XHTML


NONE

Exemplo
Fonte <tt>Teletype text</tt><br /> <i>Italic text</i><br /> <b>Bold text</b><br /> <big>Big text</big><br /> <small>Small text</small><br /> Sada

Teletype text
Italic text Bold text

Big text
Small text

Atributos Padres
id, class, title, style, dir, lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown onkeyup

UnED Divinpolis Sallum

Prof. William

63

TAG <u> tag


Definio e Utilizao
The <u> tag defines underlined text.

Differences Between HTML and XHTML


The u element was deprecated in HTML 4.01. The u element is not supported in XHTML 1.0 Strict DTD.

Tipos e Notas
Tip: Do not underline text - a user confuses it with a hyperlink!!

Exemplo
Fonte A new version is <u>now available!</u> Sada A new version is now available!

Atributos Padres
id, class, title, style, dir, lang, xml:lang

TAG <ul> tag


Definio e Utilizao
The <ul> tag defines an unordered list.

Differences Between HTML and XHTML


The "compact" and "type" attributes of the ul element were deprecated in HTML 4.01. The "compact" and "type" attributes of the ul element are not supported in XHTML 1.0 Strict DTD.

Tipos e Notas
Tip: Use styles to define the type of list.

Exemplo
Fonte <ul> <li>Coffee</li> <li>Tea</li> </ul> Sada

Coffee Tea

Atributos Opcionais

UnED Divinpolis Sallum

Prof. William

64

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset. Atributo compact type Valor disc square circle Descrio Specifies the type of the list. Deprecated. Use styles instead DTD TF TF

compact_rendering Deprecated. Use styles instead

Atributos Padres
id, class, title, style, dir, lang, xml:lang For a full description, go to Atributos Padres.

Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

UnED Divinpolis Sallum

Prof. William

65

Anda mungkin juga menyukai