!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Form option 2</title>
</head>
<body>
<style type="text/css" media= "all">
body{
background-color: aliceblue;
}
</style>
<form>
<table>
<tr>
<td>
First name <input type="text" =" First Name" name="">
</td>
</tr>
<tr>
<td>
Last Name <input type="text" ="Last Name" name="">
</td>
</tr>
<td>
Email <input type="Email" placeholder="Email" name="">
</td>
</tr>
<tr>
<td>
Password <input type="text" placeholder="password" name="">
</td>
</tr>
<tr>
<td>
<select>
<option>+254</option>
<option>+255</option>
<option>+256</option>
</select>
<input type="phone" placeholder="70781...." name="">
</td>
</tr>
<td>
Age <input type="text" ="Age" name="">
</td>
<tr>
<td>
Male <input type="radio" name="Gender">
Female <input type="radio" name="Gender">
</td>
</tr>
<tr>
<td>
<textarea name="Message" placeholder="Write a message..."></textarea>
</td>
</tr>
<tr>
<td>
<input type="Submit" value="submit" name ="">
</td>
</tr>
</table>
</form>
</body>
</html>
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).
With HTML5 you don’t need to have a table.
Search for something like html form elements
Write your form
code in HTML and then use CSS to do any styling.
Also, I see a few syntax errors. To help run your HTML code through the W3C validator.
Thanks for the correction .
Looking forward to polishing it. Thanks.
Good work so far!
It’s important to note that HTML form elements can nest directly within the form. Additionally, <table>
is strongly discouraged as a layout tool and should be used in modern web development to display tabular data.
Semantic HTML, proper use of the <div>
tag, and CSS are better options for page layouts.
Thanks for the feed back.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.