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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:45:44+00:00 2026-06-09T14:45:44+00:00

A couple of questions concerning this: Is it good practice? Will it, on a

  • 0

A couple of questions concerning this:

  • Is it good practice?
  • Will it, on a large scale, result in better load times?
  • Can it result in browsers ‘breaking’?
  • Is the same true for the last function in JavaScript (/jQuery)?

What I mean is stuff like this:

#myElement {
  position: absolute;
  top: 0;
  left: 0
}
  • 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-09T14:45:45+00:00Added an answer on June 9, 2026 at 2:45 pm

    Is it good practice?

    It’s not good practice to manually exclude semicolons. This is purely because it’s easy to overlook when adding more styles, especially if you’re working in a team:

    Imagine you start with:

    .foo {
        background-color: #F00;
        color: #000             <-- missing semi-colon
    }
    

    And then someone adds some styles:

    .foo {
        background-color: #F00;
        color: #000             <-- missing semi-colon
        width: 30px;
        z-index: 100;
    }
    

    Suddenly the other developer is wasting time figuring out why their width declaration isn’t working (or worse yet, doesn’t notice that it’s not working). It’s safer to leave the semi-colons in.

    Will it, on a large scale, result in better load times?

    Most definitely, for every block, you’d save a couple of bytes. These add up, especially for large style sheets. Instead of worrying about these performance gains yourself, it’s better to use a CSS compressor, such as the YUI Compressor to automatically remove the ending semi-colons for you.

    Can it result in browsers ‘breaking’?

    No, it’s safe, as browsers implement this part of the specification correctly. The CSS2 specification defines a declaration thusly:

    A declaration is either empty or consists of a property name, followed by a colon (:), followed by a property value.

    More importantly:

    …multiple declarations for the same selector may be organized into semicolon (;) separated groups.

    This means that ; is used to separate multiple declarations, but it is not needed to terminate them.

    Is the same true for the last function in JavaScript?

    JavaScript is a whole different beast with a completely different specification. This particular question has been answered in depth many times before on Stack Overflow.

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

Sidebar

Related Questions

I've found a couple questions about this on here, but can't find a solution.
I know there are a couple questions on SO already concerning this but none
I am currently doing some network programming and had a couple questions concerning timeouts.
I've seen a couple questions on this but haven't been able to solve it...
I found a couple questions similar to this, but not specifically for .NET projects,
I have a couple questions concerning Update (U) locks and Exclusive (X) locks. 1)
I'm a novice at JSF and I got a couple of questions concerning organizing
I had a couple questions related to this: Asterisk usage in Objective-C NSArray array;
I have a couple questions. This is an example of what i'm trying to
My prof has told me that our final exam will contain a couple questions

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.