- Trending Categories
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 create responsive typography with CSS?
To create responsive typography with CSS, the code is as follows −
Example
<!DOCTYPE html> <html> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <head> <style> h1 { font-size: 10vw; } p { font-size: 5vw; } </style> </head> <body> <h1>Responsive Text Example</h1> <p> Lorem ipsum dolor sit amet consectetur, adipisicing elit. Earum, rerum. </p> <p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Excepturi, necessitatibus officiis hic est in nobis! </p> </body> </html>
Output
The following output will be produced by the above code −
On resizing the screen −
Advertisements