Quicktip: How to insert a stylesheet into your HTML document

There are many people who are new to the web design field and have no idea how to insert a stylesheet externally or internally. In this quick tip I will show you multiple ways to insert your stylesheet into your HTML document.

Call Css Externally

The method below is the normal method for calling a stylesheet via HTML document. Place code inside of the head tags.

<link rel="stylesheet" type="text/css" href="style.css" />

Call Css via stylesheet

The method below is the normal method for calling a stylesheet from a css document. Place code inside of your stylesheet. @ Import tells the css document to import another stylesheet.

 @import url("import.css");

Call Css Internally

The code below is a way for calling a stylesheet within a HTML document. Place code inside of the body tags.

<style>
/*Insert Style code here*/
</style>

Razvan Sava the author

Razvan is the founder of Webdevtuts. He is also a web designer & developer who loves to design and develop websites. If you're looking for him you can find him via @webdevtuts

Leave a Reply