Mobile app version of vmapp.org
Login or Join
Nimeshi995

: 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),

@Nimeshi995

Posted in: #Css #Html #Mobile

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

1 Comments

Sorted by latest first Latest Oldest Best

 

@Connie744

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme