π· About HTML Responsive Web Design
A Threadπ§΅ π
π HTML Responsive Web Design
β’ Responsive web design is about creating web pages that look good on all devices.
β’ A responsive web design will automatically adjust for different screen sizes and viewports.
β What is responsive web design?
β’ Responsive Web Design is about using HTML and CSS to automatically resize, hide, shrink, or enlarge, a website, to make it look good on all devices (desktops, tablets, and phones).
π Steps For Responsive Web Design
β There are many measures taken for making Web page responsive, which are as follows:
1οΈβ£ Setting the viewport
2οΈβ£ Responsive Image
3οΈβ£ Responsive Text Size
4οΈβ£ Media Queries
π Setting The Viewport
β To create a responsive website, add the following <meta> tag to all your web pages.
β This will set the viewport of your page, which will give the browser instructions on how to control the page's dimensions and scaling.
π Responsive Images
β’ Responsive images are images that scale nicely to fit any browser size.
β Using the width property
β’ If the CSS width property is set to 100%, the image will be responsive and scale up and down.
β Using the max-width property
β’ If the max-width property is set to 100%, the image will scale down if it has to, but never scale up to be larger than its original size.
β Show Different Images Depending on Browser Width
β’ The HTML <picture> element allows you to define different images for different browser window sizes.
π Responsive Text Size
β The text size can be set with a "vw" unit, which means the "viewport width".
β That way the text size will follow the size of the browser window.
β Viewport is the browser window size. 1vw = 1% of viewport width.
β If the viewport is 50cm wide, 1vw is 0.5cm.
π Media Queries
β In addition to resize text and images, it is also common to use media queries in responsive web pages.
β With media queries you can define completely different styles for different browser sizes.
Thanks for reading this thread β€οΈ
If you like it , make sure you:
π· Like the tweet
π· Retweet the first tweet β‘
For more content , follow:
@MrunayU