Code JavaScript:
<script type="text/javascript">
function pFIdVal(id){return parseFloat(document.getElementById(id).value);}
function calculate(){
var v1=pFIdVal('mycredits')/1000000;
var v2=pFIdVal('mybytes')/5;
var v3=pFIdVal('mymarks')/1000;
var v4=pFIdVal('myexp')/1000000;
var v5=pFIdVal('myarena')/100;
var v6=pFIdVal('myclearing')/20;
var v7=pFIdVal('myweapons')/155000;
var v8=pFIdVal('myore')/2000;
var v9=pFIdVal('myherbs')/2600000;
var tG=v1+v2+v3+v4+v5+v6+v7+v8+v9;
document.getElementById('answer').innerHTML=tG;
var iR;
if(tG<3){iR='Recruit';}
if(tG>3&&tG<10){iR='Cook';}
if(tG>10&&tG<20){iR='Maintenance Guy';}
if(tG>20&&tG<30){iR='Mechanic';}
if(tG>30&&tG<40){iR='Volunteer';}
if(tG>40&&tG<50){iR='Private';}
if(tG>50&&tG<60){iR='Private First Class';}
if(tG>60&&tG<70){iR='Sniper';}
if(tG>70&&tG<80){iR='Tank Driver';}
if(tG>80&&tG<80){iR='Airman';}
if(tG>90&&tG<100){iR='Sergeant';}
if(tG>100&&tG<110){iR='Warrant Officer';}
if(tG>110&&tG<120){iR='Lieutenant';}
if(tG>120&&tG<150){iR='Caption';}
if(tG>150){iR='Secret Agent';}
document.getElementById('rank').innerHTML=iR;
}
</script>

the seocnd part of this code outputs a rank as you can see. Now here are a few things I would like to accomplish along with it.

I would like multiple lines and breaks to be displayed with each rank.

I would like to change the color of the rank text