SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2003
    Location
    UK
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Body properties inherited by <h1-4>?

    Hi -
    This is a very simple question but somehow is evading me. In the HTML utopia book the discussion on Inheritance seems to indicate that <h2> etc elements, and <p> elements are all descendents of <body>.

    In that case, if I give <body> a font-family property of, say, verdana, shouldn't <h2> or any of the others automatically reflect this property by default if it has no font definition of its own?

    font-family seems to be an inherited property. Or have I totally misunderstood the principle of inheritance?

    Regards, Steve.

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Yes, if you give the canvas a font family the headings will assume the same generic font family albeit the heading elements have their own inbuilt semantics thus size, weight and padding, etc. will differ for a <hx> than the <p>.

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2003
    Location
    UK
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi -
    Thanks for that. It was misbehaving because of a stupid mistake of mine. It's amazing how much damage you can do with a missing semi-colon...

    Regards, Steve.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •