<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href="styles.css" /> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <script src=script.js></script> </head> <body> <h1>Simple Android Phone Store</h1> <h2>Powered by JavaScript prompt() Method</h2> <div class="flex-container"> <div style="flex-grow: 1"> <h3>Price List</h3> <p class="list">Samsung | Price: $120</p> <p class="list">LG | Price: $85</p> <p class="list">Tecno | Price: $60</p> <h3>Read all Instructions First</h3> <p class="intro">1. Click the blue button to select your products. <br>2. In the dialogue box type what you want to buy. <br> 3. For all 3 phones, type All </p> </div> <div style="flex-grow: 1"> <h3>Instructions cont'd</h3> <p class="intro">4. For Samsung, type Samsung <br> 5. For Tecno, type Tecno <br> 6. For LG, type LG <br> 7. For Samsung and LG, type Samsung+LG <br> 8. For Tecno and LG, type Tecno+LG <br> 9. For Samsung and Tecno, type Samsung+Tecno <br> 10. IMPORTANT! Leave no space after typing. <br> 11. Click OK</p> <p class="intro">We will calculate total price and show your bill.</p> </div> </div> <br> <div><button onclick="myFunction()">Select Products & Calculate Price</button></div> <div class="bill-heading"> <p id="bill-heading"></p> </div> <p class="show" id="date"></p> <p class="show" id="demo"></p> <p class="show" id="dummy"></p> </body> </html>
Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML
. You can also specify the stylesheet information in styles.css
tab and scripts information in scripts.js
tab and start coding.
HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.
<!DOCTYPE html>
<html>
and ends with </html>
<h1>
to <h6>
where <h1>
is the highest important heading and <h6>
is the least important sub-heading.<p>..</p>
tag.<a>
tag.
<a href="https://onecompiler.com/html">HTML online compiler</a>
<img>
tag, where src
attribute consists of image name.<button>..</button>
tag<ul>
for unordered/bullet list and <ol>
for ordered/number list, and the list items are defined in <li>
.<a href="https://onecompiler.com/html">HTML online compiler</a>
CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.
Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.
body{
padding: 25px;
}
.title {
color: #228B22;
font-family: Candara;
}
<table>
tag.<tr>
tag<th>
tag<td>
tag<caption>
tag<script>
is the tag used to write scripts in HTML<script src="script.js"></script>