Colours and backgrounds · Cores e fundos
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
Colours
- You can name a colour:
red,blue,green,tomato,gold, and many more. - Or use a hex code like
#2a7ae2— a#followed by six letters/numbers. - Names are easy to remember; hex codes give you millions of exact colours.
Português
Cores
- Você pode nomear uma cor:
red,blue,green,tomato,gold, e muitas outras. - Ou use um código hex como
#2a7ae2— um#seguido por seis letras/números. - Nomes são fáceis de lembrar; códigos hex dão milhões de cores exatas.
English
Backgrounds
colorchanges the text colour.background-colorchanges the colour behind an element.- Put
background-coloronbodyto colour the whole page.
Português
Fundos
colormuda a cor do texto.background-colormuda a cor atrás de um elemento.- Coloque
background-colorembodypara colorir toda a página.
<style>
body { background-color: #f3f4f6; }
h1 { color: tomato; }
</style>
<h1>Hello!</h1>
<p>A page with a soft grey background.</p>
English
Common mistakes
colorsets the text;background-colorsets the background.- A colour is a name, a
#rrggbbcode, orrgb(...).
Português
Erros comuns
colordefine o texto;background-colordefine o fundo.- Uma cor é um nome, um código
#rrggbb, ourgb(...).
English
Now you try
coloris the text;background-coloris behind it.- Colour the page background, then use a hex colour on the heading.
Português
Agora você tenta
coloré o texto;background-colorestá atrás dele.- Colora o fundo da página, depois use uma cor hex no cabeçalho.
Give the whole page a soft background. Add body { background-color: lightyellow; }. · Dê à página inteira um fundo suave. Adicione body { background-color: lightyellow; }.
Colour the heading with a hex code. Add h1 { color: #2a7ae2; } (that's a blue). · Pinte o cabeçalho com um código hex. Adicione h1 { color: #2a7ae2; } (que é azul).