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
Prof. William
SERVIO PBLICO FEDERAL MINISTRIO DA EDUCAO CENTRO FEDERAL DE EDUCAO TECNOLGICA DE MINAS GERAIS UNIDADE DE ENSINO DESCENTRALIZADA DE DIVINPOLIS
Exemplo
Fonte <!Isto um comentrio--> <p>Isto um pargrafo normal</p> Sada Isto um pargrafo normal
HTML
HTML 4.01 especifica trs tipo de documentos: Strict (restrito), Transitional (transitrio), e Frameset (configuraes).
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).
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
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
rev
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
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
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
Exemplo
Fonte Sada <abbr title="Centro Federal de Ensino CEFET Tecnolgico">CEFET</abbr>
Atributos Padres
id, class, title, style, dir, lang, xml:lang
Prof. William
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
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
Prof. William
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
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
Prof. William
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
Prof. William
10
false shape rect rectangle circ circle poly polygon _blank _parent _self _top
target
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
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:
Prof. William
11
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
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
TF TF
Atributos Padres
id, class, title, style, dir, lang, xml:lang
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
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
Prof. William
13
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
TF
text
TF
vlink
TF
Atributos Padres
id, class, title, style, dir, lang, xml:lang
Tipos e Notas
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
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
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
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
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 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
Prof. William
17
Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
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
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
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
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
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
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
Exemplo
Fonte Isto um texto Sada Isto um texto
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
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
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 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
Prof. William
22
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
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
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
Prof. William
23
face size
list_of_fontnames
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
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
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
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.
Prof. William
25
Valor 0 1 URL
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
src
Atributos Padres
Somente permitidos em XHTML 1.0 Frameset DTD!! id, class, title, style
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
Prof. William
26
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
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
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
Prof. William
28
Atributos Padres
id, class, title, style, dir, lang, xml:lang
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
Atributos Padres
dir, lang, xml:lang
Exemplo
Fonte <iframe src ="/default.asp" width="100%"> </iframe> Sada
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
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
TF TF
Atributos Padres
id, class, title, style
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
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
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.
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
STF
src
URL
STF
type
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
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
Prof. William
33
Atributos Eventuais
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
Prof. William
34
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
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
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
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
Prof. William
36
hreflang media
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
rev
target
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
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
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.
Prof. William
38
Atributo id
Valor unique_name
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
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
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
STF
scheme
STF
Atributos Padres
dir, lang, xml:lang
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.
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!")
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.
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
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
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
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
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
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
Prof. William
44
Atributo disabled
Valor disabled
Descrio
DTD
Atributos Padres
id, class, title, style, dir, lang, xml:lang
Atributos Eventuais
tabindex, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
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
Prof. William
45
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
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
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
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
Prof. William
47
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
Tipos e Notas
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
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
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
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.
Tipos e Notas
Tip: Use the <span> tag to group inline-elements to format them with styles
Exemplo
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
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
Prof. William
51
type
text/css
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
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
Prof. William
52
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
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
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.
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
STF
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
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
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
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
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
Tipos e Notas
Nota: The <tfoot> must have a <tr> tag inside!
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
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,
Prof. William
58
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
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
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.
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
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
Prof. William
61
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
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
Prof. William
62
bgcolor
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
STF
Atributos Padres
id, class, title, style, dir, lang, xml:lang
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
Prof. William
63
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
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
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
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
Prof. William
65