Bernard Aybouts - Blog - Miltonmarketing.com

Approx. read time: 3 min.

Post: More than one CSS class

More than one CSS class : Using more than one CSS class, if you want to make your CSS really effective, it’s best to split your CSS classes into groups of CSS properties.

This way, when you are designing and laying out a web page you can apply more than one CSS class to your HTML element. It’s really easy to use more than one CSS class at a time. All you have to do is add the names of the different classes to your class attribute. Let’s take a look:

 

[html] <!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
<style>
.header {
background-color: lightgreen;
width: 70%;
height: 50%;
}
.text {
text-align: center;
font-size: 18pt;
}
.padding {
padding: 25px;
}
</style>
</head>
<body>
<div class="header text padding">
Hello World.<br/>
Using more than one CSS class.
</div>
</body>
</html>[/html]

Sample output of above code:

Hello World.
Using more than one CSS class.

Using CSS classes to select HTML elements

Another handy thing you can do with CSS classes is use them to change the CSS properties of a type of HTML element. To do this you use something called the element selector.

To use the element selector, you use the name of the element you want to change as the name of your CSS class. You shouldn’t include the dot before the name of your CSS class. You also don’t need to include a class attribute in the < body > tag.

So if you want all the text in your paragraphs to be centred and in a certain font size, you can create a CSS class called “p“ which will find and select your < p > tags. Let’s take a look at what using the element selector does:

[html] <!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
<style>
p { <!–This is the element selector.–>
font-size: 16pt;
text-align: center;
background-color: lightblue;
}
</style>
</head>
<body>
<p>Hello World. Using element selector.</p>
<p>All p tag elements are using the CSS</p>
<p>attributes specified in the element selector above.</p>
</body>
</html>[/html]

Sample output of above code:

Hello World. Using element selector.

All p tag elements are using the CSS

attributes specified in the element selector above.

Thats clever coding. The element selector has changed all our paragraphs (< p > tags) without us having to add a class attribute to our (< p > tags).

HTML and CSS are the most fundamental programming languages of the web. Now that you’ve mastered them you can start building your own web pages.

Knowing HTML and CSS is a great first step in a career in web design. Rather than using templates, you can create your own unique layouts – a fantastic skill!


Related Links:

Building a web-based JavaScript game

JavaScript Glossary

Object-Oriented Programming (OOP)

Using more than one CSS property

Building a web page with HTML tags

Tips and tricks for CSS coding

Learn more about JavaScript Variables

CODING WITH CSS: The style attribute

Your first Hello World app in C# Sharp

MORE CSS PROPERTIES

Learn Code Introspection Python Programming

Introduction to Batch File Viruses

Tips and Tricks for WRITING JAVASCRIPT code

 

The Longevity Blueprint: AI-Powered Health Optimization

Current step:1AI-Human Medical Analyzer: Smarter, Personalized Health
2AI-Human Medical Analyzer: Smarter, Personalized Health

> SYS.HEALTH: AI-Human Medical Analyzer_

// Revolutionize Your Diagnostics

Experience the perfect blend of cutting-edge AI precision and expert human care. Our revolutionary analyzer turns your raw health data into personalized, actionable insights tailored just for you.

> INITIALIZING_BIOMETRIC_SCAN...

[+] DATA_INPUT

Securely upload complex health parameters, including lab bloodwork and comprehensive medical history.

[+] PROCESSING

Advanced algorithmic parsing combined with human-level oversight ensures hyper-accurate data interpretation.

[+] OUTPUT_MATRIX

Receive smarter, faster, and truly personalized care strategies to take immediate charge of your health journey.

A name/nickname is required to continue.

> TRANSLATION_MATRIX_ACTIVE...
[ LANG_EN ]
Knowledge Heals, Prevention Protects
[ LANG_HI ]
ज्ञान ठीक करता है, रोकथाम सुरक्षा करती है
[ LANG_ZH ]
知识治愈,预防保护
[ LANG_JA ]
知識は癒し、予防は守る
[ LANG_HE ]
הידע מרפא, המניעה מגנה
[ LANG_AR ]
المعرفة تُشفي، والوقاية تحمي
[ LANG_FR ]
La connaissance guérit, la prévention protège

> SYS.AUTH: Data Processing Consent_

[ AWAITING_AUTHORIZATION ] By providing consent, you allow us to process your uploaded data through our proprietary AI-Human analysis system.

  • [+] SECURE_REVIEW: This ensures your information is carefully reviewed using advanced AI technology and certified professional oversight to deliver personalized health insights.
  • [+] PRIVACY_LOCK: Your privacy is our strict priority. Your data will only be used for this specific diagnostic purpose.

> SYS.UPLOAD: Share Medical Records [OPTIONAL]_

[ USER_CONTROL_ACTIVE ] Uploading your medical records during registration is entirely optional. You can choose to bypass this step and provide data later if it suits your timeline.

You dictate the data flow: share as much or as little as you’re comfortable with, and let us guide you toward better health.

[+] FORMAT_SUPPORT

We accept all file formats, including photos, PDFs, text documents, and raw official medical data.

[+] DATA_YIELD

Increased inputs correlate with higher precision. The more info you share, the better we tailor your personalized insights.

> NEXT_STEPS: Post-Registration Protocol_

Once your registration is complete, a human specialist from our team will personally reach out to you within 3-10 business days. We will discuss your health journey and map out exactly how we can support you.

About the Author: Bernard Aybout (Virii8)

Avatar Of Bernard Aybout (Virii8)
I am a dedicated technology enthusiast with over 45 years of life experience, passionate about computers, AI, emerging technologies, and their real-world impact. As the founder of my personal blog, MiltonMarketing.com, I explore how AI, health tech, engineering, finance, and other advanced fields leverage innovation—not as a replacement for human expertise, but as a tool to enhance it. My focus is on bridging the gap between cutting-edge technology and practical applications, ensuring ethical, responsible, and transformative use across industries. MiltonMarketing.com is more than just a tech blog—it's a growing platform for expert insights. We welcome qualified writers and industry professionals from IT, AI, healthcare, engineering, HVAC, automotive, finance, and beyond to contribute their knowledge. If you have expertise to share in how AI and technology shape industries while complementing human skills, join us in driving meaningful conversations about the future of innovation. 🚀