Search Helium

Home > Computers & Technology > Internet > Web Design

How to add color to an HTML web page

by Mad Killer

Created on: February 14, 2011

All those fancy colors on your HTML page, wouldn't it be great if you knew how to add color to your HTML web page? Well, this is the perfect article for you to learn from. So, lets look at the syntax: When starting up an HTML document, you need to define the page. eg. <!DOCTYPE HTML>. Next, you can add color to many different things, for example: adding color to a div or a random box. I will be writing another article about making a box on a HTML web page. Please visit. http://www.np.byethost12.com for the latest articles. 

Before you start any coding, get a suitable software package which includes HTML syntax. I personally recommend context. This program includes many different syntaxes, a simple but very powerful software. If you want a more simplified software with shortcuts, then i would really recommend DreamWeaver by Adobe. Although it costs a lot, it provides incredible experience when coding as there is a function which auto fills the code for you. 

Now, to answer the question of how to add color to a basic HTML blank page, you must understand that CSS (Cascading Style Sheet) Defines the content in your page. In order to add color, add this to the following to your HTML page:

<style type="text/css"> html { background-color: YOUR COLOR OF CHOICE; } </style> 

Now to explain the above code, lets have a look at the code in sections. <style type="text/css"> This defines the text or code you insert below, in this case, typing text with CSS syntax. The next section of the code is the syntax, the code which defines the element. html{} defines the HTML page. Every-time you have to insert a block. eg. {}

Colors are defined with a hash (#). For example, you want to make your HTML page red, enter this code respectively:  html { background-color: #F00; } or if you want your web page to be black then type this code: html { background-color: #000; }. You can find a selection of colors with the codes on this website: http://www.w3schools.com/html/html_colors.asp

Now you have a blank web page having the color black or red as the background!

For more information about HTML and CSS, please visit http://www.np.byethost12.com I will be updating this website everyday with fresh new articles and tutorials, so please stay tuned to my website.

Learn more about this author, Mad Killer.
Click here to send this author comments or questions.

Helium Debate

Cast your vote!

Should anyone have to pay to use Facebook?

Click for your side.

98330

Featured Partner

Americans for Prosperity

Americans for Prosperity (AFP) is committed to educating citizens about economic policy and mobilizing those citizens as advocates in the public policy process. AFP is an organization of grassroots leaders who engage citizens in the name...more


CONNECT WITH US

Read
our blog
Helum for writers

Write and get published
Share with other writers
Polish your freelancing skills

Join our active writing community
Helium Content Source for Publishers

Quality articles from proven freelancers
Exclusive rights, fast turnaround
Brand engagement, business blogging -- our writers do it all

Get custom content today!

INFORMATION


Helium, Inc.
200 Brickstone Square Andover, MA 01810 USA
#