Change font size

1

I am trying to change the font in an html document, however, if I indicate the font name, it does not change and the font size returns to the original.

This is the code I am using:

p { 
    padding:20px; 
    background-color: white; 
    font-size: 20px 
    font-family: Helvetica  
}
    
asked by anonymous 20.06.2015 / 20:19

1 answer

3

If you put the ; in the last two lines as the CSS syntax asks then it will work fine. In CSS when you have multiple lines / declarations followed the use of ; is required. You can read more about CSS rules and selectors in MDN . I have adapted one of the images from there:

Yourcodeshouldstay:

p{padding:20px;background-color:white;font-size:50px;font-family:Helvetica;}

Exampleofhowitwas: link
Example of how to stay: link

    
20.06.2015 / 20:28