🌐
Simmons University
web.simmons.edu › ~grabiner › comm244 › weekfour › selectors.html
CSS Selectors
The following is a list of the most common and well-supported CSS selectors. There are many, many more, but these are the ones you should know well. ... The most basic CSS selectors are Element Type Selectors.
🌐
Hostinger
hostinger.com › home › tutorials › types of css: inline, external and internal definitions and differences explained
Types of CSS: Inline, Internal and External CSS Explained
April 23, 2025 - In short, the main difference between ... we’ll go in-depth comparing the three types of CSS styles – inline CSS, external CSS, and internal CSS....
Discussions

CSS Best Practices: classes vs target elements?
Mixing the two is appropriate, the main thing to consider here is specificity. Doing general styling that you expect to be global on elements makes sense! Class selectors are more specific and will allow you to override your more global styles appropriately. When it comes to specific instances of components or related visual elements, I would stick to classes. This separates the styling from the semantics, which might change independently. So in short: styling inputs or text elements globally? Element selectors make sense. Styling specific parts of a page or portable component? Prefer classes over everything for predictable specificity and separation of concerns. More on reddit.com
🌐 r/Frontend
30
17
April 14, 2024
List of CSS Animation types?
Animations are limited only by your creativity. You can find lists of interesting transitions or animated effects, but there isn’t really a set list of all the possible animations, given that nearly every property can be animated. More on reddit.com
🌐 r/css
3
3
November 22, 2023
Different css for different types of pages?

Have you considered using your different graphs for different purposes? You’ve got three.... so three different styles, each with different CSS styles

Just an idea

More on reddit.com
🌐 r/RoamResearch
4
5
October 12, 2016
There are two types of front-end developers: the great divide
This was an interesting read. I've personally been working for 6+ years all across the frontend skillset. I've got a CS background, but always loved art and visual creation so frameworks and complicated JS apps are all good for me while I also love CSS and what can be done so quickly and easily with it. One area I've definitely been lacking is accessibility, semantic markup. Honestly, I understand semantic markup and accessibility but I've pretty much worked in two modes: (1) Big company projects where most semantics and accessibility concerns are baked into a component library or (2) small arty projects that really have no use in being overly accessible (because a screen reader can't read a funky picture). It took me a long time to accept that backend work was just not interesting to me (for the most part). I think I'll still learn more about spinning up my own servers and performant DB requests and all someday, but I'm in no rush. I hope the frontend developer keeps its value for a good while. More on reddit.com
🌐 r/Frontend
72
105
December 2, 2018
🌐
DataFlair
data-flair.training › blogs › different-types-of-css
Different Types of CSS with Examples - DataFlair
July 26, 2024 - CSS (Cascading Style Sheets) is ... and formatting of HTML elements. There are three primary types of CSS: inline, internal, and external CSS....
🌐
InterviewBit
interviewbit.com › types › types of css (cascading style sheet)
Types of CSS (Cascading Style Sheet) - InterviewBit
May 5, 2023 - Table Of Contents show What is CSS? Some More Knowledge about CSS CSS Selectors and Declarations Classes in CSS ID in CSS Types of CSS 1. Inline CSS 2. Internal CSS 3.
🌐
ThoughtCo
thoughtco.com › types-of-css-styles-3466921
Understanding the 3 Types of CSS Styles
September 24, 2020 - Understanding the three types of CSS styles — Inline, Embedded, and External Style Sheets — will help you use cascading style sheets effectively.
🌐
GeeksforGeeks
geeksforgeeks.org › css › types-of-css-cascading-style-sheet
Types of CSS (Cascading Style Sheet) - GeeksforGeeks
Inline CSS involves applying styles directly to individual HTML elements using the style attribute. This method allows for specific styling of elements within the HTML document, overriding any external or internal styles.
Published   July 11, 2025
🌐
Wikipedia
en.wikipedia.org › wiki › CSS
CSS - Wikipedia
3 weeks ago - Each level of CSS builds upon the last, typically adding new features and typically denoted as CSS 1, CSS 2, CSS 3, and CSS 4. Profiles are typically a subset of one or more levels of CSS built for a particular device or user interface.
Find elsewhere
🌐
TutorialsPoint
tutorialspoint.com › home › css › types of css
Types of CSS
June 30, 2007 - Explore the different types of CSS including Inline, Internal, and External CSS. Learn how to effectively use each type to style your web pages.
🌐
W3Schools
w3schools.com › html › html_css.asp
HTML Styles CSS
It can control the layout of multiple web pages all at once. ... Cascading Style Sheets (CSS) is used to format the layout of a webpage.
🌐
MilesWeb
milesweb.com › home › css style sheet types: inline, external, and internal [a beginner’s guide]
Types of CSS: Inline, External, and Internal [A Beginner’s Guide with Examples]
3 weeks ago - Master web styling with different types of CSS through this guide. Inline, External, and Internal are major CSS types used in the modern era.
🌐
Allthingsprogramming
allthingsprogramming.com › home › blog › types of css
Types of CSS - All Things Programming
July 11, 2025 - Developed three types of CSS: inline, internal, and external, as well as their importance and best practices.
🌐
Quora
quora.com › How-many-types-of-CSS-can-be-included-in-HTML
How many types of CSS can be included in HTML? - Quora
Answer (1 of 5): There are three ways to include the CSS with HTML: Inline CSS: An inline style may be used to apply a unique style for a single element. To use inline styles, add the style attribute to the relevant element.
🌐
Toronto Metropolitan University
pressbooks.library.torontomu.ca › webdesign › chapter › chapter-5-css-forms
Chapter 5 – Styles and CSS – Web Design Primer
March 31, 2018 - The advantage of the external CSS file is that it can be linked to and set the styles for more than one page. Figure 5-1. This Dreamweaver code view shows examples of the three types of cascading style sheets, labeled with comments (grey text).
🌐
Reddit
reddit.com › r/frontend › css best practices: classes vs target elements?
r/Frontend on Reddit: CSS Best Practices: classes vs target elements?
April 14, 2024 -

Hey everyone!

I am pretty comfortable with css but would like to learn best practices. I have been trying to find an answer/discussion in the sub and on google but cannot really wrap my head around it.

I have been wondering if 1) is it better to target html elements with their names on css or 2) preferably work with classes on them? Or 3) maybe a combination of the two?

I normally mix the two - add some classes on my html but mostly enjoy targeting the elements by their names. Especially now that css has nesting, :nth-child(), :has(), and other newer pseudo classes, etc. In addition, I also use CSS modules at work where (if I understand correctly) this encapsulates css to specific components/pages.

Say we have a hero component and the html looks like this:

  <main class="hero">
      <div class="hero__content">
        <h1 class="hero__title">Lorem ipsum dolor sit amet.</h1>
 	<p class="hero__text"> Lorem ipsum dolor sit amet, consectetur. </p>
      </div>
  </main>

In practice I could just target the whole component like so:

// css

main {
  width: min(90%, 1200px);
  div {
    padding: 1rem;
    h1 {
      color: white;
    }
    p {
      color: gray;
    }
  }
}

Just some silly properties/styling. But the point is I could target them by using their tag names (main, div, h1, p) if I want to manipulate them instead of adding too many classes and overcrowding the html file.

Can someone please clarify this? maybe share some experience/resources about good CSS practices? maybe check some real world projects that apply best practices?

Thanks a lot and would love to hear your thoughts!

🌐
W3Schools
w3schools.com › cssref › index.php
CSS Reference
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Guides › Selectors
CSS selectors - CSS | MDN
January 7, 2026 - Lists the pseudo-classes, selectors that allow the selection of elements based on state information that is not contained in the document tree, defined in the various CSS modules and HTML. ... Learn how to use the :target pseudo-class to style the target element a URL's fragment identifier. ... Explores the style limitations set on the :visited class for user privacy. ... Introduction to basic CSS selectors, including tutorials on Type, class, and ID selectors, Attribute selectors, Pseudo-classes and pseudo-elements, and Combinators.
🌐
HubSpot
blog.hubspot.com › home › website › the beginner's guide to css classes & .class selectors
The Beginner's Guide to CSS Classes & .class Selectors
June 14, 2023 - Since this CSS is closest to the HTML, it has the highest level of specificity. ID selectors: An ID is unique to a page element and thus, very specific. Class selectors, attribute selectors, and pseudo-class selectors: These three selector types have equal specificity.
🌐
Bootstrap
getbootstrap.com › docs › 3.4 › css
CSS · Bootstrap
For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles. ... Use .table-striped to add zebra-striping to any table row within the <tbody>. Striped tables are styled via the :nth-child CSS selector, which is not available in Internet Explorer 8.
🌐
Astro
docs.astro.build › en › guides › styling
Styles and CSS | Docs
Learn how to style components in Astro with scoped styles, external CSS, and tooling like Sass and PostCSS.