HTML: alterar fonte - como funciona
Em HTML, você pode alterar a fonte com uma tag simples. Explicaremos como, mas também por que o CSS é a melhor escolha.
Alterar fonte para HTML
Em HTML, existe a chamada tag de fonte. Com essa tag, você pode definir a fonte, tamanho da fonte ou cor de um texto.
- Por exemplo, poderia ser assim: Olá, eu sou Arial!
- Na captura de tela, você pode ver o resultado da linha de código sob o cabeçalho "HTML". Outro exemplo em "Monospace".
- No entanto, a tag está desatualizada e não é mais suportada no HTML5. Portanto, você deve usar CSS ou CSS embutido, como no exemplo.
- Nesse caso, a tag deve ser estruturada da seguinte maneira:
Olá, eu sou Arial!
, - Por trás da palavra "estilo", você pode inserir o código CSS em uma tag HTML. Você define a fonte aqui com "font-family".
- Como você pode ver, esse dia leva ao mesmo resultado, mas você é à prova de futuro com esse método.
Também explicamos como você pode definir o espaçamento entre linhas usando CSS.