Вы находитесь на странице: 1из 15

HTML – HiperText Markup Language

Browser Server
WEB WEB

Servidor WEB
C:\temp\teste.html

Pág Html
Pág Html

1.Estrutura do código HTML 5. Inserir Imagens c/ Hiperligação


2. Formatar texto em HTML 6. Endereços absolutos e relativos
2.1 Mudança de linha 7. Organizar ficheiros
2.2 Tipo de letra 8. Criar tabelas
2.3 Código das cores 9. Criar Formulários
3. Hiperligações 10. Molduras e Iframes
4. Inserir Imagem
HTML – HiperText Markup Language
1.Estrutura do código HTML - teste1.html

<html>
<head>
<title>
Um titulo para o documento
</title>
</head>
<body>
Este é o meu primeiro documento em HTML
</body>
</html>
HTML – HiperText Markup Language
2. Formatar texto em HTML - teste2.html
<html>
<head></head>
<body>
<b> Este texto aparece a negrito </b>
<i> Este texto aparece em itálico </i>
<sup> Este texto aparece sobescrito </sup>
<p> Este texto aparece na linha seguinte </p>
<br> Este texto aparece na linha seguinte mas mais espaçado
</body>
</html>
HTML – HiperText Markup Language
3. Hiperligações – teste3.html

<html>
<head>
</head>
<body>
<p>
<a href=teste2.html> Este texto </a> liga a um ficheiro
</p>
<p>
<a href=http://www.clix.pt/> Este texto </a> liga a um site
</p>
<p>
<a href=teste2.html target =“_blank”> Este texto </a>
liga a um ficheiro e abre uma nova janela
</p>
</body>
</html>
HTML – HiperText Markup Language
4. Inserir imagem – teste4.html

<html>
<head>
</head>
<body>

<p>Inserir uma imagem em movimento:


<img src=“hand1.gif” border =“0” Width=“50” height=“100”>
</p>

<p>Inserir uma imagem da WWW:


<img src=“http://localhost/hand1.gif” border =“0” Width=“50”
height=“100”>
</p>

</body>
</html>
HTML – HiperText Markup Language
5. Inserir imagens com hiperligações – teste5.html

<html>
<head>
</head>
<body>
<p> Imagem com hiperligação para um ficheiro
<a href=teste2.html>
<img border=0 src=hand1.gif width=50 Height=100 >
</a>
</p>

<p> Imagem com hiperligação para a WEB


<a href =http://www.clix.pt/>
<img border=0 src=hand1.gif width=50 Height=100 >
</a>
</p>
</body>
</html>
HTML – HiperText Markup Language
8. Criar tabelas – teste8.html
<html>
<head></head>
<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 – HiperText Markup Language
9. Criar formulários – teste9.html

<html>
<head></head>
<body>
<form>
Nome: <input type=“text” name= “nome”> <br>
Apelido: <input type=“text” name=“apelido”><br>
</form>
</body>
</html>
HTML – HiperText Markup Language
9.1 Criar formulários – teste9_1.html
<html>
<body>
<form>
Nome: <input type=text name= nome> <br>
Masculino: <input type=radio checked name=“sexo” value=“M” >
Feminino: <input type=radio name=“sexo” value=“F” >
<br> Marca de carro preferida
<select name=auto>
<option value=“v”> Volvo
<option value=“s” selected> Saab
<option value=“a”> Audi
</select> <br> <br>

<input type=reset value=Limpar>


<input type=submit value=Enviar>

</form>
</body>
</html>
HTML – HiperText Markup Language
10. Molduras Iframe– teste10_3.html
<html>
<body>
<iframe src=teste1.html height=100></iframe>
<iframe src=teste1.html height=50 ></iframe>
<iframe src=teste1.html></iframe>

</body>
</html>
HTTP – HiperText Transfer Protocol

Browser Server
WEB WEB

Servidor WEB

Winsock1.Connect Connect Pág Html

GETMensagens
/index.html HTTP
HTTP/1.1
Winsock1.DataSend ( Msg. HTTP)
HTTP/1.1 200 OK
<html>
Mensagens
<body>
HTTP
…=Winsock1.GetData (…)
…..Resposta
</body>
</html>

Disconnect
Winsock1.Disconnect
O IExplorer implementa o protocolo HTTP
O ClienteWEB pede ao ServidorWEB o ficheiro índex.htm

Browser Server
WEB WEB

Winsock1.Connect Connect (Localhost)

Winsock1.DataSend ( Pedido HTTP) GET /index.html HTTP/1.1


Servidor WEB
1
3 2
…=Winsock1.GetData ( Resp HTTP) HTTP/1.1 200 OK Index.html

<html>
<body> O ficheiro Index.html
reside no servidor
ola
e contém o texto:
</body>
<html>
</html>
<body>
ola
Disconnect </body>
Winsock1.Disconnect </html>
O IExplorer implementa o protocolo HTTP
Resposta do ServidorWEB

Browser
WEB
GET /index.html HTTP/1.1 Server
WEB

1
3
2
HTTP/1.1 200 OK Index.html

Date: Thu, 28 Oct 2004 14:57:50 GMT


O ficheiro index.html
Server: Apache/2.0.50 (Win32) PHP/5.0.1
reside no servidor e
Last-Modified: Wed, 27 Oct 2004 21:26:54 GMT
contém:
ETag: "f698-25-7c139609"
Accept-Ranges: bytes <html>
Content-Length: 37 <body>
Connection: close ola
Content-Type: text/html; charset=ISO-8859-1 </body>
<html> </html>
<body>
ola
</body>
</html>
Pedidos e Respostas HTTP

Browser Server
WEB WEB

Winsock1.DataSend ( Pedido HTTP) 1 Servidor WEB


GET /index.html HTTP/1.1
POST
HEAD Index.html

…=Winsock1.GetData ( Resp HTTP) 2


HTTP/1.1 200 OK
HTTP/1.1 500

<html>

</html>

Disconnect
Winsock1.Disconnect
Controlo Remoto de um Motor a partir de um Browser WEB

Browser PLC
WEB SrvWEB | CltDDE

Cabo
RS232

MotorOn.html
MotorOff.html

Вам также может понравиться