Introdução
Neste laboratório, você aprenderá como usar a tag HTML <small> para alterar o tamanho do texto. Você também aprenderá sobre as diferentes maneiras de usar a tag <small> e como aplicar estilo a ela.
Nota: Você pode praticar a codificação em
index.htmle aprender Como Escrever HTML no Visual Studio Code. Por favor, clique em 'Go Live' no canto inferior direito para executar o serviço web na porta 8080. Em seguida, você pode atualizar a aba Web 8080 para visualizar a página web.
Adicione estrutura ao seu arquivo
Crie um arquivo HTML chamado index.html no seu editor de texto.
Adicione o boilerplate HTML ao seu arquivo. Em seguida, crie uma tag <body> e adicione o seguinte código dentro dela:
<h1>Using the HTML small tag</h1>
<p>This is some text that we want to make smaller:</p>
Adicione a tag small
Adicione a tag <small> dentro da tag <p>, e adicione algum texto entre as tags de abertura e fechamento:
<p>This is some text that we want to make <small>smaller</small>:</p>
Use a tag small para texto legal
Adicione texto legal usando a tag <small> copiando e colando o seguinte código dentro da tag <body>:
<p>
This is just some regular text, but here is some <small>legal text</small>:
</p>
<small
>This website is not responsible for any misinformation or errors. Please read
carefully before trusting this website.</small
>
Aplique estilo à tag small
Aplique algum estilo à tag <small> adicionando o seguinte código dentro da tag <head>:
<style>
small {
font-size: smaller;
color: red;
}
</style>
Adicione a tag small para comentários laterais
Adicione um comentário lateral usando a tag <small> copiando e colando o seguinte código dentro da tag <body>:
<p>
This is just some text, but here is a <small>side comment</small> about this
text:
</p>
Salve suas alterações no arquivo index.html e abra-o em um navegador web. Você deverá ver as alterações que fez na tag <small>.
Resumo
Neste laboratório, você aprendeu como usar a tag HTML <small> para alterar o tamanho do texto e como aplicar estilo a ela. Você também aprendeu sobre as diferentes maneiras de usar a tag <small>, incluindo para texto legal, comentários laterais e pequenas impressões. Agora você pode usar a tag <small> para adicionar ênfase ao seu texto e fazê-lo se destacar.



