Yogesh Chauhan's Blog

How to make a web page look good on any device?

in HTML on June 16, 2019

Well, before that question let me ask you this. Have you ever heard of the phrase, "You should make a Responsive Website for your customers" or you might have heard a salesman saying that "You can fill out all the forms on computer or on your mobile. It works the same way". We all have heard about Responsive Website a lot since past few years and companies are becoming more and more aware of comsumer's mobile devices. So they want to provide the same type of experience to their mobile consumers as well. And that's why they make their websites responsive. But what is this responsive websites actually?

Responsive websites are the type of websites which changes the size; height and width; of the contents inside it so that no matter what device the user uses, he/she is going to have the same experience of using the website. The placing of the elements like textbox, menu etc might be a slight different but the overall experience is quite appealing to the user across all the formats.

REMEMBER: User should get the same type of experience of your website no matter from which device he/she uses to access your website. Period.

So what to do for responsive look and feel?

Add the following meta element in all the web pages of your website.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

What that line does is it sets the viewport of webpages. That means on different devices, that meta will tell the browser how to control the dimensions of webpage as well as scaling.

What about images?

Use the width property and set it to 100% to scale the image nicely and make it look nice to any browser.

<img src="image.jpg" style="width:100%;" />


Now, we need to do a lot more work in order to make the page responsive but this is the starting point.

Most Read

#1 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #2 How to add Read More Read Less Button using JavaScript? #3 How to check if radio button is checked or not using JavaScript? #4 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to uninstall Cocoapods from the Mac OS?

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
How to create HTML elements with ID and class using JavaScript?HTMLHow to change CSS with JavaScript?CSSHow to create a simple tab interaction using CSS?CSSWhat are Controlled Components in React?ReactWordPress: How to change a blog address (URL)?WordPressUse SwiperJS to create mobile touch sliders fastMiscellaneous