Video:How to Use a Meta Refresh Tagwith Dimitri LaBarge
Using a meta refresh tag when doing HTML coding is easier than you may thing. Watch this how-to video from About.com to see instructions for using meta refresh.See Transcript
Transcript:How to Use a Meta Refresh Tag
Hi, this is Dimitri LaBarge for About.com, and today we're going to talk about how to use a meta refresh tag.
Uses of the Meta Refresh Tag
The meta refresh tag dates back to the early days of the World Wide Web, and was an easy way to refresh and redirect pages before more sophisticated coding tools became available. If you want updated information to be constantly displayed on the web page, you could use the META REFRESH tag. It goes within your HTML page’s HEAD tag, and looks like this: HEADmeta http-equiv="refresh" content="50"/HEAD
Elements of the Meta Refresh Tag
Let’s talk about the different elements there. The first part is the actual refresh attribute. The second part that says content is the number of seconds in which you’ll want the web page to refresh.
Practical Uses of the Meta Refresh Tag
A more practical use of the META REFRESH tag is to redirect web pages to another page or site. If we were going to do this, you would alter the above code to read like this: meta http-equiv="refresh" content="5;url=http://www.about.com/”
Notice what we’ve done here. First, we’ve lowered the seconds to 5, so the REFRESH command happens more quickly. Then we’ve added a semicolon, and then a URL attribute. After 5 seconds, the browser will then send you to a new web address that you’ve specified.
While there are better and more sophisticated tools out there for redirection and in-page updating of data, META REFRESH can be very helpful to people just dipping their toes into HTML.
Thanks for watching. To learn more, visit us on the web at About.com.