li text formating in CSS

Posted on 2009-12-27
Last Modified: 2012-05-08
Hi Experts,
I am putting together a simple page with a bunch of text including  a ul with 4 li lines.  In the css I have
p, h1, h2, h3 {
      font-family:Arial, Helvetica, sans-serif;
 as the first entry.   It works great for the text on the page but it doesn't seem to affect the li text.

How can I inlcude the ul & li elements in the default font family declaration?


Question by:HelpNearMe
    LVL 51

    Accepted Solution

    just use

    body {
      font-family:Arial, Helvetica, sans-serif;

    it will be applied for all elements

    and add this if you want to have different font for, say li elements

    body {
      font-family:times new roman, corier;
    LVL 51

    Expert Comment

    sory the second part should be

    li {
      font-family:times new roman, corier;

    so all elemenst will be arial, but li will be times new roman...

    Author Closing Comment


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
    In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now