: How can I make my simple HTML pages more friendly to mobile screens? I have had a simple HTML website up for a very long time, but since the rise of modern mobile devices (e.g. iOS, Android),
I have had a simple HTML website up for a very long time, but since the rise of modern mobile devices (e.g. iOS, Android), the text rendered is painfully small and with very annoying fixed wide margins.
This is the basic structure of every page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title></title>
</head>
<body>
<p></p>
</body>
</html>
Is there an HTML or CSS solution I can use to make reading more friendly, such as allowing margins to shift on zoom or increasing the font size?
More posts by @Nimeshi995
1 Comments
Sorted by latest first Latest Oldest Best
This is easy. Add this in your <head>
<meta name=viewport content='width=device-width, initial-scale=1'>
This tells browsers to scale the page to something other than their default view.
For more information, Google for "viewport" as their are other settings but what I show is most likely all you should use.
However, there is more to coding for mobile than just that. You'll want to look into "media queries" and "mobile first" programming.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.