Here's some color HTML that's just a lot of fun and can add some neat effects to your page and give it a more professional look.
When I learned how to do this stuff, I just had to share it with everyone.
Here's a basic text box for starters:
The HTML for this looks like this: <div style="border-style: ridge; border-width: medium; color: teal; padding: 10%;"></div>
This one with a color background 'background-color: #c6e7de;':
The HTML looks like this: <div style="background-color: #c6e7de; border-style: ridge; border-width: medium; color: teal; padding: 10%;"></div>
Where 'div' is the main enclosing tag (don't for get to close it.), 'background-color' is the fill color of the box, 'ridge' is the style of the border (see alternate border styles below) 'border-width' is medium, the color of the text itself is teal (a sort of greenish-blue) and 'padding' is the space between the border and the enclosed elements (text in this case)
<div style="background-color: #9c2994; border-style: double; border-width: thick; color: #debdde; padding: 2%;">A text box with 'double' border style and 2% padding (notice how the border is closer to the text now)</div>
These are the border styles that you could use: dotted|dashed|solid|double|groove|ridge|inset|outset with the HTML border-style: [the style]; Remember that the element and it's attribute are separated by a colon and each element-attribute pair is separated by a semicolon. Also remember that all of the style elements are enclosed in quotes.
Another example:
A text box with 2% padding, thick border width, inset border style with text in bold, 12 pt, hex #ffffff (white) and a background color of hex #ffB573.
Finally, add font styling and you have something spectacular:
<div style="background-color: #21005a; border-style: ridge; border-width: medium; color: #c6b5de; padding: 2%;"><span style="font-family: Trebuchet MS,Georgia,Palatino; font-size: 18pt;"><i></i></span></div>
Note that I use 3 different fonts here: 'font-family: Trebuchet MS,Georgia,Palatino;' This is a good practice. It tries to use 'Trebuchet MS' font, but if that is not on the current users system, it tries to use 'Georgia' and so on.
If that was not enough, here's something you can do combining all of this with an image:
This is an image of a flat-screen iMac G5. It follows the original compact design reminiscent of the first Macintosh that rolled off the line in 1984. I still own one of them and it still works like brand new. The HTML 'float: left;' forces the image to the left and allows the text to flow to the right
Please leave me a comment. Tell me what you think of this site, or click on the Technorati or Stumble 'Thumb this Up!' buttons above to submit this site as a favorite.
For more HTML go to: http://write-html-code.blogspot.com/




