Você está na página 1de 6

Exemplos e Exercícios Práticos – HTML

1
Prof. João Falcão

Curso Técnico em Informática

ATIVIDADE PRÁTICA
HTML

Prof. João Falcão

2023
Exemplos e Exercícios Práticos – HTML
2
Prof. João Falcão

01) Exercício 01 – Utilização das marcas: <html>; <head>; <title>; <body>; <h1>; <h2>; <h3>; <h4>; <h5>; <h6>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exercicio nº1</title>
</head>
<body>
<h1>Header1</h1>
<h2>Header2</h2>
<h3>Header3</h3>
<h4>Header4</h4>
<h5>Header5</h5>
<h6>Header6</h6>
</body>
</html>

02) Exercício 02 – Utilização das marcas: <p>; <hr>; <br>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exercicio nº2</title>
</head>
<body>
<hr align ="center" noshade color="blue" size="5"
width="20%">
<div align="left">Mudanças de linha:<br>
<p>
"No mundo dos negócios todos são pagos com duas<br>
moedas: Dinheiro e experiência. Agarre a experiência<br>
primeiro, o dinheiro virá depois." -- Harold Geneen<br>
</p><br><br>
<p>
"Há homens que lutam um dia e são bons.<br>
Ha outros que lutam muitos dias e são melhores.<br>
Mas ha os que lutam toda a vida, e estes são<br>
imprescindiveis."<br><br>
-- Bertold Brecht </p>
</div>
<hr align ="center" noshade color="blue" size="5"
width="20%">
</body>
</html>

03) Exercício 03 – Utilização das marcas: <p align=”right”>; <br clear=”left”>; <img>; <pre>; <blockquote>; <address>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exercicio nº3</title>
</head>
<body>
<h3 align ="center">Quebras</h3>
<p>
Este texto aparece antes da imagem, a qual vai ser alinhada à
esquerda.<br>
<img src="imagens/ok.gif" align="left">
Esta frase está na mesma linha da imagem<br>
pelo que fica à sua direita. <br clear="left">
O parâmetro de limpeza faz ultrapassar a imagem. </p>
<pre>
Texto Pré-formatado Este bocado de texto tem muitos espaços e
mudanças de linha. C I U N R T S E O R N D E E T </pre>
</body>
</html>
Exemplos e Exercícios Práticos – HTML
3
Prof. João Falcão

04) Exercício 04 – Utilização das marcas: <u>; <i>; <sup>; <sub>; <big>; <small>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exercicio nº5</title>
</head>
<body>
<p><b>Algumas marcas (em bold por exemplo!!!)</b></p>
<p><i>Este parágrafo está em itálico.</i></p>
<p><u>Parágrafo sublinhado...</u></p>
<p><big>Utilizando a marca big</big> <small>e a marca
small</small></p>
<p>Mais uma marca que permite apresentar experssões do<br>
género x<sup>2</sup> e x<sub>2</sub></p>
<p>Exemplos de caracteres especiais:<br>
á à ã â ç é è õ<br>
áàãâçéèõ
</p>
</body>
</html>

05) Exercício 05 – Utilização das marcas: <font face="'Book Antiqua','Arial Narrow'" size="3" color="GREEN"></font>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exercicio nº6</title>
</head>
<body>
<font face="book antiqua" align="left">
<h1>Fontes:
</h1></font>
<p>
<font face="book antiqua, arial narrow" size="3"
color="gren">
"No mundo dos negócios todos são pagos com duas<br>
moedas: Dinheiro e experiência. Agarre a experiência<br>
primeiro, o dinheiro virá depois." -- Harold Geneen<br>
</font>
</p>
<p>
<font face="bookman old style" size="+2" color="red">
"Há homens que lutam um dia e<br>
são bons.<br>
Ha outros que lutam muitos dias e<br>
são melhores.<br>
</font>
<font face="bookman old style" size="5" color="blue">
Mas ha os que lutam toda a vida,<br>
e estes são<br>
imprescindiveis."<br>
</p>
-- Bertold Brecht
</font>
<br><br>
</body>
</html>
Exemplos e Exercícios Práticos – HTML
4
Prof. João Falcão

06) Exercício 06 - Utilização das marcas: <table>; <caption>; <tr>; <th>; <td>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exercicio nº7</title>
</head>
<body text="blue">
<table border="1" width="400" height="120"
cellspacing="1">
<caption align="Bottom">Tabela nº2</caption>
<tr>
<th colspan="2" bgcolor="99FFFF">Direcção</th>
</tr>
<tr>
<td>Amadeu Leite Furtado</td>
<td>amadeu@isp.pt</td>
<tr/>
<tr>
<th colspan="2" bgcolor="99FFFF">Serviços Técnicos</th>
</tr>
<tr>
<td>Rosa dos Santos</td>
<td>rosa@isp.pt</td>
</tr>
</table>
</body>
</html>

07) Exercício 07 - Utilização das marcas: <a>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exercicio nº9</title>
</head>
<body >
<a href ="Exer1.html">Exercicio nº1</a><br>
<a href ="Exer2.html">Exercicio nº2</a><br>
<a href ="Exer3.html">Exercicio nº3</a><br>
<a href ="Exer4.html">Exercicio nº4</a><br>
<a href ="Exer5.html">Exercicio nº5</a><br>
<a href ="Exer6.html">Exercicio nº6</a><br>
<a href ="Exer7.html">Exercicio nº7</a><br>
<a href ="Exer8.html">Exercicio nº8</a>
</body>
</html>
Exemplos e Exercícios Práticos – HTML
5
Prof. João Falcão

08) Exercício 08 - Utilização das marcas: <table>; <caption>; <tr>; <th>; <td>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exercicio nº8</title>
</head>
<body text="blue">
<br><br>
<table width="20%" border="1" cellspacing="1"
cellpadding="3" align="center" >
<caption align="bottom">
Tabela 1. Estatísticas
</caption>
<tr>
<td rowspan="2" colspan="2"></td>
<th colspan="3" align="center"
bgcolor="yellow">Demografia</th>
</tr>
<tr>
<th bgcolor="yellow">Homens</th>
<th bgcolor="yellow">Meninas</th>
<th bgcolor="yellow">Professor</th>
</tr>
<tr align="center">
<th bgcolor="yellow" rowspan="4">Turmas</th>
<th bgcolor="yellow">A</th>
<td bgcolor="yellow">20</td>
<td bgcolor="yellow">5</td>
<td bgcolor="yellow">João Pedro</td>
</tr>
<tr align="center">
<th bgcolor="yellow">B</th>
<td bgcolor="yellow">21</td>
<td bgcolor="yellow">3</td>
<td bgcolor="yellow">idem</td>
</tr>
<tr align="center">
<th bgcolor="yellow">C</th>
<td bgcolor="yellow">25</td>
<td bgcolor="yellow">2</td>
<td bgcolor="yellow">Maria João</td>
</tr>
<tr align="center">
<th bgcolor="yellow">D</th>
<td bgcolor="yellow">20</td>
<td bgcolor="yellow">0</td>
<td bgcolor="yellow">idem</td>
</tr>
<tr align="center">
<th bgcolor="yellow" colspan="2">Total</th>
<td bgcolor="yellow">86</td>
<td bgcolor="yellow">4</td>
<td bgcolor="yellow">2</td>
</tr>
</table>
</body>
</html>
Exemplos e Exercícios Práticos – HTML
6
Prof. João Falcão

09) Exercício 09 - Utilização das marcas: <img>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">


<html>
<head>
<title>Exercicio nº 10</title>
</head>
<body >
<img src="imagens/ok.gif" alt="Tudo OK" width="250"
height="250" >
</body>
</html>

10) Exercício 10 - Utilização das marcas: <frameset>; atributo “target


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Exer12</title>
</head>
<frameset cols="25%,*"frameborder="1">
<frame name="janela1" src="Exer12_lateral.html" noresize
scrolling="no">
<frame name="janela2" src="Exer12_meio.html" noresize
scrolling0"auto">
</frameset>
<body>
<noframes>
O seu computador não comporta frames<br><br>
Actualize a versão do seu navegador:<br><br>
</noframes>
</body>
</html>

Você também pode gostar