IDs and Classes

IDs and Classes

Element.How also offers premium tutorials! Check them here:

Table of Contents

Before moving on to the CSS course, it's important to look at HTML IDs and classes. This chapter examines these two attributes, their differences, and the best way to use them. Learning about HTML IDs and classes is important because they are an essential part of styling using CSS.

Moreover, JavaScript can also use these attributes to access and manipulate elements.

Roll up your sleeves, and let's dive into the code.

ID Attribute

Access tutorial

$99/one time Purchase access

Includes

  • Gain Access to This TutorialUnlock complete access to the current tutorial: IDs and Classes
  • Future UpdatesYou will get access to all future updates to this tutorial.
  • Enjoy Unlimited UsageUse on as many of your own sites or your clients sites as you wish.

    Note that reselling or redistributing is not permitted.

Access everything

$299/one time Purchase All Access

Includes

  • Unlock every premium tutorial on Element.howGet access to the entire library of premium tutorials on Element.how
    Preview premium tutorials
  • Get access to the CSS course for Elementor usersAccess the complete 14 HTML chapters, 30 CSS chapters and 7 Elementor Projects.Learn more
  • Simple CSS Grid For ElementorAn Elementor Addon to Create Awesome Grid Layouts in a Single Click for Containers, Galleries and Loop Grid. Learn more
  • free extra: ShapeDividers.com Premium AccessLifetime Premium Access to ShapeDividers.comVisit ShapeDividers.com
  • 6 months money backNo questions asked money back. Not what you expected? Get a refund.
  • One-time payment of only $299No hidden fees or subscriptions.

    Sales taxes added where applicable.
  • Support not needed!Due to personal circumstances, I no longer offer support. The vast majority of customers never needed support to start with, so chances are you will be just fine, the tutorials and templates provided are complete.

    I also extended the refund window from 1 to 6 months, during which you can get a full refund for any reason.
  • Lifetime access to everything Element.howThe price reflects what is currently available on Element.how. All future updates are included, but none are promised. You pay for what is available now, and the rest is a sweet extra.
* All prices are USD. Applicable taxes will be charged at checkout. Have a question? See the FAQ or email me.

Element.how also provides premium tutorials showing awesome advanced designs, check them out here.

Looking for something else? Search across 2927 Elements right here:

Checkout the Elementor Addon Finder directly

3 Responses

  1. Hi there!

    I did not understand what was the difference between these two snippets of code? I know you were talking about targeting more than one class, and specific classes.

    .intro-texts, .big-texts {
    /* Your CSS code goes here. */
    }

    .intro-texts.big-texts {
    /* Your CSS code goes here. */
    }

    1. Hey Miguel!

      I improved the clarity of this part in the chapter.

      Essentially, the first snippet is a list of two selectors. Both selectors can be targeting completely different elements. The CSS rule will then be applied to both set of elements targeted.

      Snippet two is an example of a multiple class selector. The targeted element needs to have both classes in his HTML 'class' attribute for it to be a match with the selector. If an element only has the class 'intro-texts' or 'big-texts', the selector won't be a match, and the related CSS rules won't be applied to that element.

      You will learn about this more in details in the CSS Selectors chapter.

      Cheers!

Leave a Reply