---
title: "Links to the stylesheets in Responsive Templates"
description: "Continuing our tutorial on how to create a Responsive Template, we are moving to step 3 of the process where we add the CSS links to the stylesheets on the head section. The previous tutorial..."
url: https://www.inmotionhosting.com/support/website/website-design/links-stylesheets-responsive-templates/
date: 2013-06-04
modified: 2023-12-04
author: "InMotion Hosting Contributor"
categories: ["Website Design"]
type: post
lang: en
---

# Links to the stylesheets in Responsive Templates

Continuing our tutorial on how to create a Responsive Template, we are moving to step 3 of the process where we add the CSS links to the stylesheets on the head section. The previous tutorial explained what you need to create for the CSS stylesheets. This tutorial will explain how to link your stylesheets to your HTML document.

Launch your web presence quickly and easily with [Shared Hosting](https://www.inmotionhosting.com/shared-hosting). Our user-friendly hosting is perfect for everyone, providing the fastest shared hosting experience possible, all powered by cPanel.

![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Free Domain & SSL Certificates ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)Unlimited Bandwidth ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)400+ One-Click Applications ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)USA & European Data Centers

[Shared Hosting Plans](https://www.inmotionhosting.com/shared-hosting)

## Link for the Main Stylesheet

To get the general styles to work on your website, you will need to link to the file. Below is the code for the link to the *style.css* file.

```

```

## Using CSS Media Attribute

### Link for the Desktop Styles

The first style sheet will need to load when the browser size is the typical Desktop computer monitor size. Lately, wide screen monitors are popular, so we will have the large styles load when the *browser is larger than 1440 pixels*. Below is the link to the *desktop-style.css* stylesheet from the previous tutorial. You place the code in the head section of your site.

```

```

The *min-device-width* is set to 1440px to make the *desktop-style.css* sheet load when the browser size is at 1440 pixels.

### Link for the Tablet Styles

When the browser window goes *below 1440 pixels*, the medium stylesheet will load. The *minimum width is 800 pixels* before it will switch to the mobile stylesheet. Below is the code that goes in the head section for your *medium-style.css* stylesheet for tablets and smaller screens.

```

```

Now when the browser goes from a minimum of 800 pixels to a maximum 1439 pixels, the *medium-styles.css* sheet will load.

### Link for the Mobile Styles

The mobile style sheet will be set up to load when the width is a *minimum width of 100 pixels* and a *maximum width of 799 pixels*. This will make the website adjust to the mobile version when the width goes under 800 pixels. We will use the following link to the *mobile-style.css* stylesheet.

```

```

This code will load the *mobile-styles.css* sheet when the browser is below 799 pixels. The style sheet will stop shrinking at 100 pixels.

## CSS Media Attributes explained

Below is a brief explanation of what each attribute does.

| CSS Attribute | What the Attribute Does |
| --- | --- |
| width | The width of the browser window area. |
| height | The height of the browser window area. |
| min-width | The minimum width of the browser window area. |
| max-width | The maximum-width of the browser window area. |
| device-width | The width of the device’s entire display area regardless of browser window width. |
| min-device-width | The minimum width of the device’s entire display area regardless of browser window width. |
| max-device-width | The maximum width of the device’s entire display area regardless of browser window width. |
| device-height | The height of the device’s entire display area regardless of browser window height. |
| orientation | The orientation of the device whether “*landscape*” or “*portrait*“. |
| aspect-ratio | Detects the aspect ratio of the “*browser width*” to “browser *height*” of the media. Example 2/1 |
| device-aspect-ratio | Detects the ratio of value of the “*device width*“to “*device height*” media. |
| color | Number of bits per color component of the device. |
| color-index | Number of entries in the color lookup table of the output device. |
| monochrome | Number of bits per pixel in a monochrome frame buffer. |
| resolution | The “*dpi*” or “*dpcm*” resolution on the device. |
| scan | The scanning process of a “*tv*“. |
| grid | Detects whether the device is grid or bitmap. |

## The entire code for the head section

[![ResponsiveTemplate with styles](https://www.inmotionhosting.com/support/wp-content/uploads/2013/06/edu_website-design_206_website-responsive-template-head_view-with-styles.png)](/support/wp-content/uploads/2013/06/edu_website-design_206_website-responsive-template-head_view-with-styles.png)

Once you understand how the stylesheets will load, you can add the code to your website. The below code is the entire head section you will need at the top of your HTML code. The links to the stylesheets are in red. Copy the following code and place it at the [top of your HTML code](/support/website/adding-html-web-design/).

```
  
  

Your Website Title





```

Now that you have the code for the stylesheets and the HTML you will [need to add the Viewpoint META tag for the mobile devices](/support/edu/wordpress/viewpoint-meta-tag-website-responsive-template/) to accept the styles.
