Draw a Simple Bar Chart in HTML

There are a lot of graphics packages for Web pages on the market, but sometimes you still want a homegrown solution. Using just HTML, it is possible to create simple bar charts. The trick is to embed tables inside a table and change the width property of the

tag of the inner table. To create a simple positive only bar chart, use this template. Just repeat the code between the

tag for each item you want to display. Note that there is a blank space in the

field. Without this blank space, the bar would not be displayed in Netscape.

 
Item 1
37%

This code produces this bar chart:

Item 1
37%

It is a little trickier if you want to display positive and negative data. Instead of having one nested table, you have two tables, each nested in its own

tag. Also, you have to change the alignment so that negatives are right-aligned while positives are left-aligned. You can play with the widths of the

tags of the outside table for different effects.

 
Item 1
15%
Item 2
-3%

This code produces this bar chart:

Item 1
15%
Item 2
-3%
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS