Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7869977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:28:46+00:00 2026-06-03T01:28:46+00:00

The below is a much simplified version of the real HTML: <html> <head> <style

  • 0

The below is a much simplified version of the real HTML:

<html>
<head>
<style type="text/css">
        h3 { background: blue; }
        p {background:grey; }
    </style>
</head>
<body>
    <h3>The paragraph below will style correctly.</h3>
    <p>
        As you can see, I am stylish.</p>
    <p>
        <h3>But this paragraph goes wrong.</h3>
        I am sad. I have no style.
    </p>
</body>
</html>

Slap that in a browser (have tried Firefox 12 and IE9) and whilst the first paragraph gets a grey background, the second one has none. Note, it doesn’t even have a blue background, the styling has been lost. It is my understanding that the background of the h3 should only affect the h3, not travel upward into the parent and affect that.

Have I missed something? Note the above is simplified. I want headers in my paragraphs, but this seems to be impossible without style errors. Is there a mistake in the above? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:28:47+00:00Added an answer on June 3, 2026 at 1:28 am

    It is not valid markup to have headers within a paragraph which is why the styling is getting screwed up.

    You can validate your markup here: http://validator.w3.org/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd really appreciate any help with this problem. This is a much simplified version
In the diagram below you can see a simplified version of what I'm trying
After loosing much sleep I still cannot figure this out: The code below (its
I haven't read much about it, but the author at the link below recommends
I was expecting the below scenario common, but couldn't find much help online. I
I am writing a program with c++ that uses MPI. The simplified version of
This is a simplified version of a query we are running where we need
Consider the code below (which has been simplified). I have a service class that
This is a much simplified repro which illustrates how class Predicate delcared outside main()
Below is a simplified example of a stored procedure I've created. DELIMITER // CREATE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.