Comment Box Colors
This page contains examples of adding color to comment boxes. Feel free to copy and paste this code into your own website.
Background Color
You add color to your comment box using CSS. Here, we change the background color of the comment box. We do this by applying the CSS background-color
property to the HTML <textarea>
element.
Choose your colors with the HTML color picker.
Text Color & Size
Here, we change the color of the text inside the comment box. We do this by applying the CSS color
property to the HTML <textarea>
element. We also change the font, size, and lineheight of the text using the font
property.
Button Color
Here, we change the color of the submit button and its text. We do this by applying both the background-color
and color
properties to the button. We also apply the border
to style the button's border. The button is specified using the HTML <input>
tag (although we could just have easily used the <button>
tag).
Scrollbar Color
Here, we specify scrollbar properties which include changing the color of the scrollbar. We do this with a bunch of -webkit-
properties (such as ::-webkit-scrollbar
, ::-webkit-scrollbar-thumb
, and ::-webkit-scrollbar-track
).
The above example will only work on Chrome and other webkit based browsers. This is because it uses webkit extensions (i.e. the bit that goes -webkit-
).
For more scrollbar examples, see HTML scrollbars.
For an explanation on customized scrollbars, see CSS scrollbars.
HTML Reference
-
HTML Tutorial
Free HTML tutorial that explains how to code in HTML.
This tutorial explains what HTML elements and attributes are, and how to use them.
I explain the basics, such as what you need in order to write HTML and how to create your first web page.
I then cover other HTML topics including tables, adding color, images, forms, image maps, iframes, meta tags, and more.
I also explain the difference between HTML and CSS (and when to use each one).
Go to HTML Tutorial -
HTML Tags
Full list of all HTML elements.
This is an alphabetical list of HTML elements, linking to a full page of details for each element.
All elements are based on the official HTML5 specification, and include usage notes, full attribute list, as well as links to the various specifications for each element (i.e. HTML4 spec, HTML5 spec, WHATWG spec).
Go to HTML Tags -
CSS Properties
Full list of CSS properties.
Alphabetical list of CSS properties as per the W3C specifications.
CSS stands for Cascading Style Sheets. CSS is the standard way to style web pages.
You can use CSS to set the style for a whole website in one place. CSS allows you to set colors, fonts, widths, heights, margins, padding, and much more.
Go to CSS Properties