The bar code control enables the rendering of one-dimensional and two-dimensional bar codes in webpages. Bar codes provide a simple and inexpensive method of encoding text information that is easily read by inexpensive electronic readers. The control supports various one-dimensional bar codes and two-dimensional bar codes, including QR codes.