Need help with html!

Hey guys! I’ve made a basic pricing calculator and I’m okay with the HTML that I created but I can’t seem to make it multiply with the prices that are on them… can someone please help me fix it

<div class="price-calculator">
        	<div class="container">
            	<div class="calculate-price">
                <form>
                	<h2><i class="fa fa-mortar-board"></i>Calculate The Price</h2>
                    
                    <div class="calculator-fields">
                    	<ul>
                        	<li>
                            	<label>Academic level</label>
                                <select name="">
                                	<option value="2" selected>Undergraduate</option>
                                	<option value="3">Graduated</option>
                                	<option value="4">Masters</option>
                                </select>
                            </li>
                        	<li>
                            	<label>Type Of Paper</label>
                                <select name="">
                                	<option value="2" selected>Essay</option>
                                	<option value="3">Letter</option>
                                	<option value="4">Aplication</option>
                                </select>
                            </li>
                        	<li>
                            	<label>Deadline</label>
                                <select name="">
                                	<option value="2" selected>07 Days</option>
                                	<option value="3">05 Days</option>
                                	<option value="4">03 Days</option>
                                </select>
                            </li>
                        	<li>
                            	<label>Pages</label>
                                <select name="">
                                	<option value="2" selected>01 (275 words)</option>
                                	<option value="3">02 (550 words)</option>
                                	<option value="4">03 (825 words)</option>
                                </select>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="calculate-bottom">
                    <input name="submit" type="submit" value="Calculate0"/>
                    </div>
                </form>
                </div>
            </div>
        </div>
	</div>

HTML will produce a form, but will not process it or do calculations, you need some scripting to do that.
What type of script do you plan to use for this?

1 Like

I’m not sure. This is my first time trying HTML. I intend to use it as a widget but I’m not sure how to make it caculate.

The choice of script will depend on how and when you want to calculation to take place.
If you want it to happen “on the fly” on page as the form fields are chosen, you will need a client-side script, such as javascript. If the data is to be post-processed after form submission, you will need server-side scripting, such as PHP.

Needless to say, this will go beyond just using html.

1 Like

I just intend to use it as a simple calculator at the front page to let people know the price it would cost them. I’m quite confused. I thought it would be easy but apparently, It isn’t. -_-

It’s easy enough, just take it one step at a time.

First up is to make sure the HTML is valid.

Maybe you already have it and just didn’t have it your example code. but if you need it, try this

<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Template</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
</head>
<body>
<h1>Template</h1>
<!-- your HTML here -->
</body>
</html>
3 Likes

Thank you. That really helped. I think I need to go study a bit more about this before I create something so complex to me. lol

Thanks for the help guys! :slight_smile:

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.