FF1+, IE5+ Opr7+

Typing Text Script

Author: Twey @ DD Forums

Note: Updated April 11th, 06'. Script now object oriented, and supports typing out of HTML tags and entities!

Description: A script that causes any text on the page to be typed out, one letter at a time. Simply tell the script the ID of the text's container (ie: a DIV or SPAN), and the script does the rest. HTML tags within the text to type out is supported as well.

Browsers that do not support this script will simply see the text fully displayed from the start, including any HTML tags.


Thanks for visiting Dynamic Drive! Wow, HTML gets properly typed out too!

This text has a slashing cursor at the end.
And this is on a new line, thanks to the <br> tag.

Directions Developer's View

Step 1: Insert the below code in the HEAD section of your page:

Select All

The code references an external JavaScript file, TypingText.js (right click, and select "Save As"), which you should download.

Step 2: Then, simply add the below sample HTML to your page, which shows how to create typing text out of two arbitrary content on the page:

Select All

Wordpress Users: Step by Step instructions to add ANY Dynamic Drive script to an entire Wordpress theme or individual Post