Search code examples
cssxhtmlstylesheet

Paragraph Styles in a CSS Style Sheet


i am trying to make two different styles for two paragraphs in an xhtml document using a css style sheet. ive tried everything and searched everywhere but nothing has given me a straightforward answer.


Solution

  • style.css:

    p.style1 {
        ...
    }
    
    p.style2 {
        ...
    }
    

    page.html:

    <p class="style1">Paragraph with style1</p>
    <p class="style2">Paragraph with style2</p>
    

    Straightforward enough? :)