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 9014599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:32:55+00:00 2026-06-16T03:32:55+00:00

I understand the title is a bit misleading, but I come from an Object-Oriented

  • 0

I understand the title is a bit misleading, but I come from an Object-Oriented background, and I’ve recently began a shift towards web development. I’ve only got a basic grasp of HTML, and been learning and messing around with CSS, but there are some parts of it that are a bit confusing, and I’m trying to get it into terms I can understand.

My CSS:

.Person .span4 p
{
     margin-left: 10px;
     margin-right:10px;
     margin-top:10px;
}

From what I can understand, this means that any p tag that is inside a container, like with the class of “span4″, which is in turn inside another container that has class=”Person” will be formatted with the specifications listed above.
In other words person.span4.p.format(String[] formatArgs), where the formatArgs are the margin-left, right, and top.

The Question: Is this an appropriate way to look at it?

I know it might be comparing apples to oranges, but I’d like to get an opinion before I go running with some conclusion that could be very wrong, and an actual explanation on how these work.

  • 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-16T03:32:56+00:00Added an answer on June 16, 2026 at 3:32 am

    Your question about .Person .span4 p is correct, that will style a p element that’s a descendant of an element with a span4 class that’s a descendant of an element with a Person class.

    However I wouldn’t try to interpret classes in HTML as similar in any way to OO classes. They’re completely different concepts, and I think that’ll just end up confusing things.

    Classes can be assigned to HTML elements using the class attribute (class="span4"), and these can then be used in CSS or JavaScript to apply additional styling or behaviours to those elements. Think of giving an element a class as tagging it with a particular keyword, so it can be easily targeted later. Elements can also be assigned multiple classes by separating them with a space, eg. class="span4 box".

    In addition, .Person .span4 p isn’t actually a “class”, it’s a selector. The .span4 syntax is called a class selector, the p is an element selector, and using a space between two selectors creates a descendant selector. Additionally #myId is an ID selector, and there are plenty of other types of selector as well.

    I’d recommend this guide as a good way to get up to speed on the correct terminology.

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

Sidebar

Related Questions

Sorry, the title is a bit hard to understand but I'm not 100% sure
The title is actually a bit misleading, but I wanted to keep it short.
I understand the title may sound confusing, but the goal is very clear: I
As you can understand from title, i modified Settings.cs file.Added some properties, some code
Ok, the wording of the title is a bit odd but I didn't really
So I know I butchered the title a bit but if someone looks here
I know. The title was a bit....hard to understand. I will see what I
Ok, the title may be difficult to understand, but this is what I want
This question should be quite clear from its title alone, but let me explain
Note: The title may be misleading. If you understand my problem and think of

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.