Jump to content
MacLustre

What does "demo" mean in id="demo" ?

Recommended Posts

Hi I've seen id="demo" in a few tutorials, but there's no explanation of what "demo" means or why it's used. In on section of the tutorial on this Site, on one line it's used this way: <p id="demo"></p> and then further on it's used here: document.getElementById("demo").innerHTML=voteable; Why-What "demo"? Thanks in advance.

Share this post


Link to post
Share on other sites

You could put anything you want there. That is just the name they decided to use.

Share this post


Link to post
Share on other sites

Its an abbreviation for Demonstration, so it means, they are using the <p> tag to demonstrate how you can GET a reference to an element with id via javascript.

Edited by CodeName

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×