CSS - Style a Website by its Structure and not with a ton of classes

CSS - Style a Website by its Structure and not with a ton of classes

I'm currently writing a small website for fun and now I need to design it and I'm not really experienced in CSS. I don't want to declare a ton of classes or ids in my html file, so my question is if there is a way to avoid these within the CSS code.

I'm currently writing a small website for fun and now I need to design it and I'm not really experienced in CSS. I don't want to declare a ton of classes or ids in my html file, so my question is if there is a way to avoid these within the CSS code.

Wasn't there a way to only apply CSS-declaration to children, so I can design a website by its structure.

I already tried

header article {
  css-declaration;
}

and

header.article {
  css-declaration;
}

but these didn't work. I also did some research, but I didn't find anything.

An example Code:

<body>
  <header>
    <h>Title</h>
  </header>

<article> <header> <h>Article Title</h> </header>

&lt;section&gt;
  &lt;h&gt;Section Title&lt;/h&gt;
&lt;/section&gt;

</article> </body> article header h { css-declaration; }

As you can probably imagine, I only want to affect the <h> element (Article Title), which is located in a <header> within an <article>, but I don't want to affect the <h> element (Title) in a <header>element in the <body> element as well not the <h> element (Section Title) in the <section>element.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

The Ultimate Guide to Web Development with HTML and CSS

The Ultimate Guide to Web Development with HTML and CSS. Learn Web Development by creating a Blog with HTML and CSS. Make a web applications using HTML5 and CSS3. Create a blog from Scratch.

Animate Any SVG icons with CSS Only | SVG Stroke Animation With Html CSS

Animate Any SVG icons with CSS Only | SVG Stroke Animation With Html CSS

HTML 5 Tutorial: How to create a table using HTML tags and Stylesheet (CSS)

In this article, we want to show you how to create a table using HTML tags and Stylesheet (CSS). HTML table may vary depends on data and style requirements. Sometimes, in the real application, we use an HTML table as a layout of the Email template in HTML format.