Html code is the basic building block of web development for beginners it becomes difficult to learn it by themself. Here is a complete list of HTML code examples with syntax and how to use this code or tags in HTML.
HTML code for the button with link
I you want to use the button with a link then you can use a hyperlink tag to create a button with CSS or you can put your button under <a> tag
<button class="btn">click me</button>
<a href="btn">click me</a>
<style>
.btn{
outline:none; //toremove default ouline from button
border:none; // to remove border
text-decoration:none;
}
</style>
HTML code for the video
You can use the video tag of html5 to embed video in your HTML page or webpage.
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4"> //video type and source
<source src="movie.ogg" type="video/ogg"> //aletrnate video type with source
</video>
HTML code for the table
to show tabular data you will have to use the table tag of HTML.
<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
tr:nth-child(even) {
background-color: #dddddd;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
</style>
</head>
<body>
<h2>HTML Table</h2>
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Nodel</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro FF Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico city</td>
</tr>
<tr>
<td>Ernst Handel</td>
<td>Roland Tenure</td>
<td>Austria courty</td>
</tr>
<tr>
<td>Island Trading</td>
<td>Helen Bennett</td>
<td>UK nation</td>
</tr>
<tr>
<td>Laughing Bacchus Winecellars</td>
<td>Yoshi Tannamuri</td>
<td>Canada</td>
</tr>
<tr>
<td>Magazzini Alimentari Riuniti</td>
<td>Giovanni Rovelli</td>
<td>Italy</td>
</tr>
</table>
</body>
</html>
HTML code for Registration form
For the HTML code of registration. You will need to use of form tag and inputs to enter the information like email name mobile number etc.
HTML code for login page
For the HTML code of the login page, you can use the same code as the registration page. The only thing you need to change is the title of the page and submit function which you want to perform on submit of the login form.
HTML code for the form
The HTML form is the most important element of website design and web development as most of the frontend web pages need this tag if you are designing a login or registration page of another dashboard page.
<form action="/action.php">
<label for="firstname">First name:</label><br>
<input type="text" id="firstname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lastname" name="lname" value="Doe"><br><br>
<input type="submit" value="Submit">
</form>
HTML form examples with code
See the following html form example with html and css code ready to use .
HTML code for blinking text color
Blinking text is can be created using CSS3 animation. You can use css3 @keyframe animation of css3
HTML code for link open in new tab
To open and webpage using a hyperlink tag you can add the target attribute to open the webpage or HTML in a new tab.
<a href="https://frontendzone.com" target="_blank">open page</a>
HTML code for gradient background
top 5 Best gradient background with CSS and HTML