Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="Calculate the turnover of employees">
  <div id="nametext">
<h1>Employee turnover rate</h1>
    </div>
  <div  id="introduction">
    <p> The turnover rate (ie, the rate of entry and exit of workers to and from one of the departments or departments) indicates the average number of workers. . If the turnover rate is 12%, this means that 12 workers out of every 100 workers are likely to leave work.</p>
  </div>
  <div id="nametext">
<h2>Calculation of turnover rate:</h2>
    </div> 
<div id="explain">
  <p>The following tool will automatically provide you with the calculation of the turnover during a specified period, just fill in the required data and press the "Calculate" button, and the program will calculate.</p>
  </div>
  <div id="number1">
  <h3>Number of employees in the first period: </h3>
<input type='number' min='0' step='1' id='first-period-input'/>
<h3>Number of employees in the last period: </h3>
<input type='number' min='0' step='1' id='last-period-input'/>
  <h3>Number of employees leaving their work for any reason during this period: </h3>
<input type='number' min='0' step='1' id='resigned-period-input'/>
  
  <h1> Result</h1>
<div id = 'result-container'>
  <button id='calculate-ratebtn'>Calculate</button> -> <span id='result'></span>
</div>
              
            
!

CSS

              
                #nametext{
   text-align: center;
  border-bottom: dashed 1px black;
  text-shadow: 2px 2px  5px blue;
}
#result{
  color: green;
   border-bottom: dashed 1px black;
  
}

              
            
!

JS

              
                var calculateButton = document.getElementById('calculate-ratebtn');
calculateButton.onclick = function(){

   var Resigned = document.getElementById('resigned-period-input').value;
     var number1 = document.getElementById('first-period-input').value;
     var number2 = document.getElementById('last-period-input').value;
var result = (Resigned / ((number1 /2 +number2 /2 )))*100;
  
  
document.getElementById('result').innerHTML = result+ ' %' ;
}
              
            
!
999px

Console