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 I recommend using CSS style sheets.
For example, create a file named estilo.css
and add it to it:
.titulo1 {
color: #CC0099;
font-family: Verdana;
}
p {
color: red;
}
In the html call it like this (the css should be in the same folder as your html and the <link>
should be within <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:
style.css:
.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 .box1 h1
selector will apply the style to all h1
elements within elements that have the box1
class.
I recommend you read: