<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style > h1{ text-align: center; height: 300px; line-height: 300px; font-size: 200px; } @media only screen and (max-1200px ) { h1{ height: 200px; line-height: 200px; font-size: 120px; } } @media only screen and (max-720px ) { h1{ height: 100px; line-height: 100px; font-size: 60px; } } </style> </head> <body> <h1>HelloWorld</h1> </body> </html>