- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use Meta Tag to redirect an HTML page?
Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.
To use a META Tag to redirect your site is quite easy. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute.
The following is an example of redirecting current page to another page after 2 seconds. If you want to redirect page immediately then do not specify the content attribute.
Example
<!DOCTYPE html> <html> <head> <title>HTML Meta Tag</title> <meta http-equiv = "refresh" content = "2; url = https://www.tutorialspoint.com" /> </head> <body> <p>This is demo text.</p> </body> </html>
Advertisements