HTML Red Code
Có thể bạn quan tâm
This page contains HTML code for coloring an element red. You can have red text, a red background, or a border around an element.
Red Text
This example uses inline styles to set the text color to red (i.e. I use the style attribute against the HTML element).
In this case, I apply the styles against a <div> tag, but I could just have easily applied them against a <div> tag (for all text within that element) or even a <body> tag (for all text on the page).
| Source Code | Result |
|---|---|
| Red text | Red text |
Here's the same thing, but this time using embedded styles.
| Source Code | Result |
|---|---|
| Red text | Red text |
You could also place the CSS code into a external style sheet.
Red Background Color
You can set the background color of an element to red by using the CSS background-color property or the background shorthand property.
In this example, I've placed text inside a <div> tag, set its background color to red, and set its text color to white.
| Source Code | Result |
|---|---|
| White text, red background. | White text, red background. |
Red Border Color
In this example, I've added a red dotted border around a <div> element.
| Source Code | Result |
|---|---|
| I have a red dotted border. | I have a red dotted border. |
Red Color Codes
The above examples use red as the color value. I could just as easily used the hexadecimal or RGB color values and the result would've been the same.
Here are the various methods of specifying the color red in HTML.
| Source Code | Result |
|---|---|
| Red text Red text (hexadecimal #ff0000) Red text (hexadecimal shorthand #f00) Red text (RGB value rgb(255,0,0)) | Red text Red text (hexadecimal #ff0000) Red text (hexadecimal shorthand #f00) Red text (RGB value rgb(255,0,0)) |
Shades of Red
Here are some different shades of reds that can be used instead of just plain old "red".
|
HTML Tutorial
HTML Templates
HTML Codes
Text Code
Table Code
Link Code
Image Code
Color Code
- Color Code Chart
- HTML Color Picker
- Color Schemes
- HTML Black Code
- HTML White Code
- HTML Red Code
- HTML Green Code
- HTML Blue Code
Background Code
Marquee Code
Form Code
Textbox Code
Scrollbox Code
Character Codes
HTML Editors
HTML Generators
HTML Reference
HTML Tags
Từ khóa » Html Color Tag Red
-
Changing Colors
-
HTML Colors - W3Schools
-
#FF0000 (Red) HTML Color Code - Computer Hope
-
HTML Text Color - HTML Color Codes
-
Red Color Code - HTML RGB Red Color
-
HTML | Color Attribute - GeeksforGeeks
-
HTML Color Code Generator: Red
-
Red Color Codes
-
Color In HTML
-
Applying Color To HTML Elements Using CSS - MDN Web Docs
-
Font Color Red In Html Code Example - Code Grepper
-
How Do I Make Text Red In HTML? - Quora
-
HTML - Colors - Tutorialspoint