Home Blog Archive Internet HTML: color codes to define how to

HTML: color codes to define how to

  • Oct 29, 2025
  • 571
  • 0

In HTML you can define colors in several different ways. We will show you how to do this.

Color codes in HTML to define

Basically, you can define colors in HTML in two ways - either with color names or hex codes. Color names are more memorable, however, most of use Web developers hex codes for encoding the colors:
  • Hex code: The Hex-number is the color coding always has six digits. The first two Digits are for the red component, the next two for green and the last two for blue. In front of a color hash signs: "# always". You can define a red background color so: "". Please note that the spelling is outdated and without Style Sheets. You avoid so for example, this Code: "".
  • Color name: Function in principle as well as hex codes. A red Background, you could create so: "". On the Internet you can find detailed tables with hundreds of color names.
Professional it is a shift in the color definitions in an external Stylesheet (CSS). In a further practical tip we will explain the differences between HTML and CSS.

YOU MAY ALSO LIKE

0 COMMENTS

LEAVE A COMMENT

Human?
1 + 3 =