HTML Blue Code
This page contains HTML code for coloring an element blue. You can have blue text, a blue background, or a blue border around an element.
This example uses inline styles to set the text color to blue (i.e. I use the
style attribute against the HTML element).
Here's the same thing, but this time using embedded styles.
You could also place the CSS code into a external style sheet.
Blue Background Color
You can set the background color of an element to blue 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
blue, and set its text color to
White text, blue background.
Blue Border Color
In this example, I've added a blue border around a
Blue Color Codes
The above examples use
blue 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 blue in HTML.
Blue text (hexadecimal #0000ff)
Blue text (hexadecimal shorthand #00f)
Blue text (RGB value rgb(0,0,255))
Shades of Blue
Here are some different shades of blues & cyans that can be used instead of just plain old "blue".