` element, and set the background to the web-safe color. To make the hexadecimal value easier to read, put it inside a separate `
` element. Update the Bash script to look like this:
+
+```
+#!/bin/bash
+for r in 0 3 6 9 c f ; do
+ for g in 0 3 6 9 c f ; do
+ for b in 0 3 6 9 c f ; do
+ echo "#$r$g$b
"
+ done
+ done
+done
+```
+
+When you run the new Bash script and save the results to an HTML file, you can view the output in a web browser to all the web-safe colors:
+
+```
+$ bash websafe.bash > websafe.html
+```
+
+![Colour gradient.][3]
+
+The web page isn't very nice to look at. The black text on a dark background is impossible to read. I like to apply some HTML styling to ensure the hexadecimal values are displayed with white text on a black background inside the color rectangle. To make the page look really nice, I also use HTML grid styles to arrange the boxes with six per row and some space between each box.
+
+To add this extra styling, you need to include the other HTML elements before and after the for loops. The HTML code at the top defines the styles and the HTML code at the bottom closes all the open HTML tags:
+
+```
+#!/bin/bash
+
+cat<
+
+
+ Web-safe colors
+
+
+
+
+
+EOF
+
+for r in 0 3 6 9 c f ; do
+for g in 0 3 6 9 c f ; do
+for b in 0 3 6 9 c f ; do
+
+echo "#$r$g$b
"
+
+done
+done
+done
+
+cat<
+