mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
Use semantic HTML tags for tutorial form example (#2715)
* Indent form example * Use semantic HTML for form example * Add `type` attributes to inputs and button
This commit is contained in:
@@ -370,9 +370,13 @@ if (str_contains($_SERVER['HTTP_USER_AGENT'], 'Firefox')) {
|
||||
<programlisting role="html">
|
||||
<![CDATA[
|
||||
<form action="action.php" method="post">
|
||||
<p>Your name: <input type="text" name="name" /></p>
|
||||
<p>Your age: <input type="text" name="age" /></p>
|
||||
<p><input type="submit" /></p>
|
||||
<label for="name">Your name:</label>
|
||||
<input name="name" id="name" type="text">
|
||||
|
||||
<label for="age">Your age:</label>
|
||||
<input name="age" id="age" type="number">
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
Reference in New Issue
Block a user