Adding Color

Dear Sciaku Learner you are not logged in or not enrolled in this course.

Please Click on login or enroll now button.

If you have any query feel free to chat us!

Happy Coding! Happy Learning!

Lecture 44:- Adding Color

Color can be added to HTML elements using CSS by setting the "color" property.

The color property can accept a variety of values, including:

  • Named colors: such as "red", "blue", "green", etc.
  • RGB values: specified as rgb(R, G, B), where R, G, and B are integers from 0-255 representing the red, green, and blue components of the color.
  • Hexadecimal values: specified as #RRGGBB, where RR, GG, and BB are pairs of hexadecimal digits representing the red, green, and blue components of the color.
  • HSL values: specified as hsl(H, S, L), where H is an angle from 0-360 representing the hue of the color, S is a percentage representing the saturation of the color, and L is a percentage representing the lightness of the color.

Here is an example of how to add color to an h1 element using RGB values:

cssCopy code

h1 {  color: rgb(255, 0, 0); }

This sets the color of all h1 elements to red.

You can add color to any element by applying a CSS rule with the color property to a selector that targets that element. This can be done either directly in the HTML element using an inline style, or in an external or internal stylesheet.

6. Styling With CSS

Comments: 2

profile
@niteshguptav63
17-Nov-2024, 01:39 PM

I am not able to access videos from second class and further. I have already completed first class

profile
@niteshguptav63
16-Nov-2024, 10:56 AM

When will I get my course?

profile
@admin79
17-Nov-2024, 01:29 PM

Now, Your query was resolved.

Frequently Asked Questions (FAQs)

How do I register on Sciaku.com?
How can I enroll in a course on Sciaku.com?
Are there free courses available on Sciaku.com?
How do I purchase a paid course on Sciaku.com?
What payment methods are accepted on Sciaku.com?
How will I access the course content after purchasing a course?
How long do I have access to a purchased course on Sciaku.com?
How do I contact the admin for assistance or support?
Can I get a refund for a course I've purchased?
How does the admin grant access to a course after payment?