Add some style · Adicione algum estilo
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · Esta página precisa de um navegador recente (com suporte a SharedArrayBuffer). Por favor, atualize Chrome, Edge, Firefox ou Safari para a versão mais recente.
English
Adding style
- HTML gives your page its content. CSS makes it look good.
- The easiest way to add CSS is a
<style>block near the top of your page. - Inside it, you write rules that change how things look.
Português
Adicionando estilo
- HTML dá conteúdo à sua página. CSS a torna bonita.
- A maneira mais fácil de adicionar CSS é um bloco
<style>perto do topo da sua página. - Dentro dele, você escreve regras que mudam como as coisas parecem.
English
A CSS rule
- A rule has three parts:
p { color: blue; } pis the selector — which tags to change (here, every paragraph).coloris the property — what to change.blueis the value — what to change it to. (Together,color: blue;is one declaration.)
Português
Uma regra CSS
- Uma regra tem três partes:
p { color: blue; } pé o seletor — quais tags mudar (aqui, todos os parágrafos).coloré a propriedade — o que mudar.blueé o valor — o que mudar para. (Juntos,color: blue;é uma declaração.)
<style>
p { color: blue; }
</style>
<p>Now I am blue.</p>
<p>So am I!</p>
English
Common mistakes
- Link the CSS file, or put rules inside a
<style>block. - Each CSS rule ends with a semicolon
;.
Português
Erros comuns
- Linkie o arquivo CSS, ou coloque regras dentro de um bloco
<style>. - Cada regra CSS termina com um ponto e vírgula
;.
English
Now you try
- Write your rules inside the
<style>block. - Colour your paragraphs, then your heading.
Português
Agora você tenta
- Escreva suas regras dentro do bloco
<style>. - Colora seus parágrafos, depois seu cabeçalho.
Make every paragraph blue · azul. Inside the <style> block, add the rule p { color: blue; }. · Faça cada parágrafo azul. Dentro do bloco <style>, adicione a regra p { color: blue; }.
Now colour the heading too. Add a rule h1 { color: red; }. · Agora pinte o cabeçalho também. Adicione uma regra h1 { color: red; }.