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

  • Home
  • SEARCH
  • 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 977195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:51:56+00:00 2026-05-16T03:51:56+00:00

What does the + in this CSS rule mean? h2 + p { font-size:

  • 0

What does the + in this CSS rule mean?

h2 + p { 
  font-size: 1.4em; 
  font-weight: bold;
  color: #777; 
} 
  • 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-05-16T03:51:57+00:00Added an answer on May 16, 2026 at 3:51 am

    + is the adjacent sibling combinator.

    That means the selector h2 + p only selects the p that comes immediately after an h2.

    An illustration:

    <h2>Headline!</h2>
    <p>The first paragraph.</p>  <!-- Selected [1] -->
    <p>The second paragraph.</p> <!-- Not selected [2] -->
    
    <h2>Another headline!</h2>
    <blockquote>
        <p>A quotation.</p>      <!-- Not selected [3] -->
    </blockquote>
    

    What’s selected and what’s not:

    1. Selected
      This p comes right after the first h2.

    2. Not selected
      This p occurs after the first p as opposed to the h2. Since it doesn’t immediately follow the h2, it’s not selected.

      However, since it still follows the h2 element, just not immediately, the selector h2 + p won’t match this element, but h2 ~ p will, using the general sibling combinator instead.

    3. Not selected
      This p is located within a blockquote, and there’s no h2 before it inside the quote to satisfy its selector.

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

Sidebar

Related Questions

Possible Duplicate: What does this CSS shorthand font syntax mean? Sometimes the font is
I am trying to delete the first css rule. However, this does not work
CSS has a @font-face rule which allows us to use custom fonts. Does JavaScript
Possible Duplicate: How does this CSS triangle shape work? Please help me i need
I have this CSS style that does a rounded corners for div border, but
<style type=text/css> #[':0:adId'] { /* this does not work */ background:red; } </style> <div
For some reason the background does not appear. This is the CSS div.sidebar_beige {
In this codepen there is a css selector &:hover what does that selector match?
How does one create Dynamic CSS and JavaScript On-The-Fly (using PHP). This needs to
Does anyone have a modern CSS method for doing something like this? I've been

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.