Return a sample HTML page with a list, a table and a form
Responses
- 200
- Success.
Example
Request
curl -X GET "https://api.testingapis.com/api/formats/html" \
-H "X-TestingApis-Key: YOUR_API_KEY"Response200 OK
Content-Type: text/html; charset=utf-8
<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8"><title>TestingAPIs Sample Page</title></head>
<body>
<h1 id="title">TestingAPIs Sample Page</h1>
<p class="intro">Hardcoded HTML for testing HTTP clients and HTML parsers.</p>
<ul id="users">
<li data-id="1">Alice Johnson</li>
<li data-id="2">Bob Smith</li>
<li data-id="3">Carol White</li>
</ul>
<table id="prices"><tr><th>Item</th><th>Price</th></tr><tr><td>Mug</td><td>12.99</td></tr><tr><td>Lamp</td><td>29.99</td></tr></table>
<form action="/api/echo" method="post"><input name="q" value="bee"><button type="submit">Send</button></form>
</body>
… (1 more lines)Sign in to see the details
The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.