You can use ;
and font-family
, as already mentioned by other users, an example:
<h1 style="color:#CC0099; font-family: Verdana">Um dia eu aprendo</h1>
<p style="color:red">This is a paragraph.</p>
However for a better organization recommend using CSS files, style sheets.
For example, create a file called estilo.css
and add this to it:
.titulo1 {
color: #CC0099;
font-family: Verdana;
}
p {
color: red;
}
In html call it that (css must be in the same folder as your html and <link>
should stay inside <head>
):
Example in html:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="estilo.css" type="text/css">
</head>
<body>
<h1 class="titulo">Um dia eu aprendo</h1>
<p>This is a paragraph.</p>
</body>
</html>
You can also divide by "Divs", for example:
css style.:
.box1 h1 {
color: #CC0099;
font-family: Verdana;
}
.box1 p {
color: red;
}
html:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="estilo.css" type="text/css">
</head>
<body>
<div class="box1">
<h1 class="titulo">Um dia eu aprendo</h1>
<p>This is a paragraph.</p>
</div>
</body>
</html>
The selector .box1 h1
will apply style to all elements h1
within elements having the class box1
.
I recommend you read:
So much of answer I find it impossible for you to go without learning now. Hug :-)
– Danilo Pádua
Just needed to mark some question as solved
– Wallace Maxters