Professional Documents
Culture Documents
HTML
CSS
Javascript
ASP
ASP.NET
PHP
JAVA
HTML O html é a linguagem básica da WWW. A maioria dos
documentos da Internet encontar-se escrita em HTML,
dai a sua importância.
<body> e </body>
HTML <html>
<head>
<title>
um título para o documento
</title>
</head>
<body>
Este é o seu primeiro documento feito em HTML.
</body>
</html>
<html><head><title></title></head>
<body>
<p> esta linha e a seguinte
não aparecem separadas</p>
<p> esta linha e a seguinte </p>
<p> já aparecem separadas</p>
esta linha e a seguinte <br>também
embora com um espaço mais pequeno
<html> <head>
<style type="text/css"> Pagina com cor de fundo
body {background-color: #CC00CC}
p {margin-left: 20px}
</style>
</head> <body> </body> </html>
HTML • Por aqui as cores
HIPERLIGAÇÕES
HTML
<html> <body>
<p>
<a href="ficheiro1.htm">este texto</a> liga a um ficheiro </p>
<p>
<a href="http://www.clix.pt/">este texto</a> liga a um
sítio na WWW </p>
<p>
<a href="ficheiro1.htm" target="_blank">este texto</a> liga a
um ficheiro e abre uma janela nova </p>
</body> </html>
<html> <body>
<p>Inserir uma imagem:
<img src="metal.gif" border="0" width="50" height="100"> </p>
<html> <body>
<p>Imagem com uma hiperligação para um ficheiro na pasta:
<a href="nomeficheiro.htm">
<img border="0" src="rato.gif" width="50" height="100">
</a> </p>
<a href=“http://webmail.sapo.pt/login.php3”>este
texto</a>
Liga a um sitio na WWW.</p>
HTML Referencia a imagens ou outros objectos.
<html> <body>
<p>Inserir uma imagem:
<img src="cha.gif" width="50" height="100"> </p>
</body> </html>
HTML REFERENCIAS AO DOCUMENTO HTML
<html> <body>
<p>
<a href="/pasta/subpasta/ficheiro1.htm">este texto</a> liga-se a
um ficheiro usando um caminho absoluto </p>
<p>
<a href="../ficheiros/ficheiro2.htm">este texto</a> liga-se a um
ficheiro usando um caminho relativo </p>
</body> </html>
HTML Criar tabelas
<html>
<body>
<p> aqui está uma tabela</p>
<table border="1">
<tr><td>verde</td><td>azul</td><td>branco</td
></tr>
<tr><td>amarelo</td><td>branco</td><td></td>
</tr>
</table>
</body>
</html>
<html><body>
<p> aqui está uma tabela</p>
<table border="1"><tr>
<td><table
border="1"><tr><td>Carlos</td></tr><tr><td>
</td></tr></table></td>
<td>Ana</td></tr>
<tr><td> </td><td> </td></tr>
</table>
</body></html>
HTML Tabelas mais complexas
<html><body>
<p> aqui está a tabela</p>
<p> tem 3 linhas e 4 colunas</p>
<table border="1" bgcolor="red">
<tr><th>título 1</th><th colspan="3">título 2</th></tr>
<tr> <td bgcolor="blue">texto 1</td > <td
background="bola.jpg" >
</td><td>texto2</td><td>texto 3</td></tr>
<tr><td align="left" >texto 4</td> <td align="right">texto
5 </td>
<td>    texto 6
    </td>
<td></td></tr> </table></body></html>
HTML Tabelas mais complexas
<table border="1">
<tr> <td rowspan="2">Telefone:</td> <td>555 777
854</td></tr>
<tr> <td>222 888 818</td></tr>
</table>
<html><body>
<form>
Nome:
<input type="text" name="nome">
<br>
Apelido:
<input type="text" name="apelido">
</form>
</body></html>
Receber informação do visitante através do formulário.
HTML <html><body>
<form action="mailto:endereco@algures.com" method="post"
enctype="text/plain">
Nome:
<input type="text" name="nome"><br>
Masculino:
<input type="radio" checked name="sexo" value="M"> <br>
Feminino:
<input type="radio" name="sexo" value="F"> <br>
<select name="auto">
<option value="volvo">Volvo
<option value="saab" selected>Saab
<option value="audi">Audi
</select> <br>
<html>
<frameset cols="25%,50%,25%">
<frame src="ficheiro1.html">
<frame src="ficheiro2.html">
<frame src="ficheiro3.html">
</frameset>
</html>
<html> <body>
<a href ="conteudo1.html" target ="mostra ">
Moldura 1</a><br>
<a href ="conteudo2.html" target ="mostra ">
Moldura 2</a><br>
<a href ="conteudo3.html" target ="mostra ">
Moldura 3</a><br>
</body></html>