Table of Contents
styling css text | css text styles
Hey friends, today I’ll teach how to style HTML text using CSS! Btw, I’m CodingPorium and I make coding tutorials and provide Free Source Code on YouTube and Instagram.
HTML Text
We use text in HTML to convey messages, tell about yourself, and literally many more. Without text, your website will definitely look dull unless you want to use your website to show any photos, etc.
Generally, the text on your HTML site is black in color in default. However, with the power of CSS, we can configure it to make it much more beautiful.
Element or Class?
We can style text using CSS but we need to decide what to use. Do you want to style by using the HTML tag as the selector or give a class or id for your text and then style it?
In today’s demo, to make things simple, I will be using the HTML tag itself to style as the selector. Let’s move on.
Basic Code
Okay, now let’s move on to styling it.
css text Color Change
we can first try changing the color of the text. This is possible by using the CSS color property. We will change its color to a red color. Look at the code block below for a better understanding.
css text Background Color
Now let’s add some background color for a nice highlight effect or just for design. we will use the background-color property for this. Look at the code block below for more:
css text Underline Effect
You can do a lot more!
These were just some basic examples. With the power of CSS through properties like padding, center text-align, etc you can style your text to look even more awesome. Below I’m going to show a code block example where I’ve added several more CSS properties.
Check it more
HTML – CSS project ideas by Code With Random
calculator Html javascript | calculator javascript code
bootstrap navbar – responsive bootstrap navbar
notification CSS style | Html top bar slide down notification CSS
CSS responsive menu | CSS animated Menu
countdown timer HTML javascript | free countdown timer
A Custom checkbox in CSS? | Create a custom checkbox using CSS?
In this post, we learn how to style text with CSS . If we made a mistake or any confusion, please drop a comment to reply or help you in easy learning.
written by @codingporium
Thanks for reading! Do contact me via the methods below if you have to say anything: