1
0
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:
Tim MacDonald
2023-08-29 17:19:15 +10:00
committed by GitHub
parent 60bd8b786b
commit d3229141aa

View File

@@ -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>