Simple Example of sass


Prev Tutorial Next Tutorial

Simple Example of sass

Here we discuss about how to create sass code and it's relative Html code. In case of SASS code two file (Html file and .scss file) is created by developer and .css file is automatically created.

Example of sass Html file

   <title>Simple Example of sass</title>  
   <link rel="stylesheet" type="text/css" href="style.css"/>  
   <h1>Simple Sass Example</h1>  
   <h3>This is my first SASS Code</h3>  
   <p>SASS is very simple and easy to learn and use code.</p>  

Next step create style.scss file which is similar to .css file but difference between them is sass file is save with .scss extension and css file save with .css.

Example of sass scss file

h1  {
font:size: 22px;
color: green;
 h3  {
font:size: 18px;
color: red;
 p  {
font:size: 14px;

Execute scss code

To execute scss code follow these steps;

  • Open command promp
  • Type command: sass --watch style.scss:style.css
execute sass code

When you excute style.scss code i will automatically create style.css file inside rood directory. Whenever you change the SCSS file, the style.css file will changed automatically. style.css file have following code;

convert sass file to css

At last when you execute html code it will read css file and the output would be like below;

execute sass html file
Prev Tutorial Next Tutorial


Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: or 9999595223

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements

Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: or 9999595223 Try this Keyword C++ Programs