Write different headings from heading 1 to 6, in HTML.
<html>
<head>
<title>Various headings in html</title>
</head>
<body>
<h1>This is my first heading</h1>
<h2>This is my second heading</h2>
<h3>This is my third heading</h3>
<h4>This is my fourth heading</h4>
<h5>This is my fifth heading</h5>
<h6>This is my sixth and last heading</h6>
</body>
</html>
It will produce this;
This is my first heading
This is my second heading
This is my third heading
This is my fourth heading
This is my fifth heading
This is my sixth and last heading
Create a button which when clicked it produce “An error has occurred”.
Use of on Click in HTML
<html>
<head>
<title>printing my first program</title>
</head>
<body>
<p>Click on the button below and see the result</p>
<input type="button" onClick="alert('An error has occurred')" value="Click me">
</body>
</html>
It will produce this;
Click on the button below and see the result
<html>
<head>
<title>printing my first program</title>
</head>
<body>
<p>Click on the button below and see the result</p>
<input type="button" onClick="alert('An error has occurred')" value="Click me">
</body>
</html>
It will produce this;
Click on the button below and see the result
Comments