Thẻ <meta> dùng để định nghĩa siêu dữ liệu (metadata) trong tài liệu HTML như thông tin, từ khóa, tác giả, v.v. Với HTML5, bạn có thể thiết lập viewport với thẻ <meta>.

Các cách khác nhau để thêm meta thông tin và dùng thẻ <meta>:
Tác giả (Author)
Dùng để thêm tác giả trang web:
<meta name="author" content="Amit">
Mô tả (Description)
Dùng để định nghĩa mô tả trang web:
<meta name="description" content="Learn from Text and Video Tutorials">
Từ khóa (Keywords)
Dùng để thêm từ khóa cho trang web:
<meta name="keywords" content="Java, WordPress, Drupal, Android, iOS">
Thiết lập Viewport
Viewport dùng để kiểm soát bố cục trên trình duyệt di động. Nó dùng trong <meta> để chỉ thị trình duyệt cách kiểm soát kích thước và tỷ lệ trang web.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Ví dụ
Chạy mã sau để học về thẻ <meta>:
<!DOCTYPE html> <html> <head> <meta name="description" content="Learn from Text and Video Tutorials"> <meta name="keywords" content="Java, WordPress, Drupal, Android, iOS"> <meta name="author" content="Amit"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <p>This is is demo text. The head tag consists of all the meta information.</p> </body> </html>