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
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.