How website's layout changes while using computer and mobile?

There are so many websites which's layouts are different while using computer and mobile. facebook.com, aliexpress.com are example. So, do I have to code two different time for two different device? or there is an amother way?

2/12/2020 6:18:40 AM

RH Tasin

3 Answers

New Answer


use this meta tag and it should help for responsive web design <meta name="viewport" content="width=device-width, initial-scale=1.0">


Use <meta> tag for responsive web design. This helps to change the width of the output screen according to the device used by you Insert this code: <meta name = "viewport" content = "width=device-width, initial-scale = 1.0">


And also except meta tag you need to use @media in CSS.