Remember to save the HTML file as index.html, the CSS file as styles.css, and the JavaScript file as script.js. Place all three files in the same directory and make sure to include the Bootstrap CSS CDN link in the HTML file. By doing so, you should be able to run the Adsense Revenue Calculator Tool in a web browser with responsive design and colorful styling.
<!DOCTYPE html>
<html>
<head>
<title>Adsense Revenue Calculator</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href=".container {
text-align: center;
margin-top: 100px;
}
h1 {
color: #1e90ff;
}
#result-container {
margin-top: 20px;
}
form {
max-width: 400px;
margin: 0 auto;
}
">
</head>
<body>
<div class="container">
<h1>Adsense Revenue Calculator</h1>
<form id="calc-form">
<div class="form-group">
<label for="page-views">Page Views:</label>
<input type="number" class="form-control" id="page-views" placeholder="Enter page views" required>
</div>
<div class="form-group">
<label for="ctr">Click-Through Rate (CTR):</label>
<input type="number" class="form-control" id="ctr" placeholder="Enter CTR in percentage" required>
</div>
<div class="form-group">
<label for="cpc">Cost Per Click (CPC):</label>
<input type="number" class="form-control" id="cpc" placeholder="Enter CPC in USD" required>
</div>
<button type="submit" class="btn btn-primary">Calculate</button>
</form>
<div id="result-container"></div>
</div>
<script src=".container {
text-align: center;
margin-top: 100px;
}
h1 {
color: #1e90ff;
}
#result-container {
margin-top: 20px;
}
form {
max-width: 400px;
margin: 0 auto;
}
"></script>
</body>
</html>
No comments:
Post a Comment