Responsive web design

A screenshot of Wikipedia on a computer screen
A screenshot of Wikipedia on a mobile phone screen
A screenshot of Wikipedia with the responsive skin Vector 2022, on a computer screen (left) and on a mobile phone screen (right). The elements rearrange themselves into a more mobile friendly layout.
Content is like water, a saying that illustrates the principles of RWD

Responsive web design (RWD) or responsive design is an approach to web design that aims to make web pages render well on a variety of devices and window or screen sizes from minimum to maximum display size to ensure usability and satisfaction.

A responsive design adapts the web-page layout to the viewing environment by using techniques such as fluid proportion-based grids, flexible images, and CSS3 media queries, an extension of the @media rule, in the following ways:

Responsive web design became more important as users of mobile devices came to account for the majority of website visitors. In 2015, for instance, Google announced Mobilegeddon and started to boost the page ranking of mobile-friendly sites when searching from a mobile device.

Responsive web design is an example of user interface plasticity.

Challenges, and other approaches

Luke Wroblewski has summarized some of the responsive and mobile design challenges and created a catalog of multi-device layout patterns. He suggested that, compared with a simple responsive web design approach, device experience or RESS (responsive web design with server-side components) approaches can provide a user experience that is better optimized for mobile devices. Server-side CSS generator implementation of stylesheet languages like Sass can be part of such an approach. Google has recommended responsive design for smartphone websites over other approaches.

Although many publishers have implemented responsive designs, one challenge for responsive design adoption was that some banner advertisements and videos were not fluid. However, search advertising and (banner) display advertising came to support specific device platform targeting and different advertisement size formats for desktop, smartphone, and basic mobile devices. Different landing page URLs have been used for different platforms, or Ajax has been used to display different advertisement variants on a page. CSS tables permitted hybrid fixed and fluid layouts.

There have been many ways of validating and testing responsive web designs, ranging from mobile site validators and mobile emulators to simultaneous testing tools like Adobe Edge Inspect. The Chrome, Firefox and Safari browsers and developer tools have offered responsive design viewport resizing tools, as do third parties.

History

Unlike most document formats, HTML+ (and HTML in general) leaves out instructions that determine the precise appearance [of a web page]. The rendering software makes choices on fonts, font size, whitespace etc. for itself (perhaps guided by user preferences). This was a major feature already of the first HTML specification. However, web developers wanted more control, and many web developers resorted to HTML tables or other hacks to specify the layout while maintaining some basic responsiveness in their websites.

First major site to feature a layout that adapts in a non-trivial manner to browser viewport width while still controlling the layout was Audi.com launched in late 2001, created by a team at Razorfish consisting of Jürgen Spangl and Jim Kalbach (information architecture), Ken Olling (design), and Jan Hoffmann (interface development). Here the adaptation was simply to switch between three layouts depending on browser window width, by Javascript. Limited browser capabilities meant that for Internet Explorer, the layout could adapt dynamically in the browser whereas, for Netscape, the page had to be reloaded from the server when resized.

Cameron Adams did a similar thing in 2004, with a single-column layout as default and Javascript switching to a CSS for the prime layout when the browser window width exceeded a threshold. By 2008, a number of related terms such as "flexible", "liquid", "fluid", and "elastic" were being used to describe layouts. CSS3 media queries were almost ready for prime time in late 2008/early 2009. Ethan Marcotte coined the term responsive web design—and defined it to mean fluid grid / flexible images / media queries—in a May 2010 article in A List Apart. He described the theory and practice of responsive web design in his brief 2011 book titled Responsive Web Design. Responsive design was listed as #2 in Top Web Design Trends for 2012 by .net magazine after progressive enhancement at #1.

Mashable called 2013 the Year of Responsive Web Design.

Mobile-first design and progressive enhancement are related concepts that predate responsive web design. Browsers of basic mobile phones do not understand JavaScript or media queries, so a recommended practice was to create a basic web site and enhance it for smartphones and personal computers, rather than rely on graceful degradation to make a complex, image-heavy site work on mobile phones.

User interface plasticity is the capacity of a user interface to withstand variations of both the system's physical characteristics and the environment while preserving usability.

See also