Skip to content

Commit d322914

Browse files
authored
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
1 parent 60bd8b7 commit d322914

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

chapters/tutorial.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,13 @@ if (str_contains($_SERVER['HTTP_USER_AGENT'], 'Firefox')) {
370370
<programlisting role="html">
371371
<![CDATA[
372372
<form action="action.php" method="post">
373-
<p>Your name: <input type="text" name="name" /></p>
374-
<p>Your age: <input type="text" name="age" /></p>
375-
<p><input type="submit" /></p>
373+
<label for="name">Your name:</label>
374+
<input name="name" id="name" type="text">
375+
376+
<label for="age">Your age:</label>
377+
<input name="age" id="age" type="number">
378+
379+
<button type="submit">Submit</button>
376380
</form>
377381
]]>
378382
</programlisting>

0 commit comments

Comments
 (0)