Sure! Here's a large chunk of random HTML code (approximately 1,000 tokens) that you can use for testing purposes. It includes various HTML elements like headings, paragraphs, lists, tables, forms, and some inline styles to make it a bit more interesting.
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Random HTML Test Document</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: #f4f4f9;
color: #333;
}
header, footer {
background-color: #222;
color: white;
padding: 15px 20px;
text-align: center;
}
nav {
margin: 15px 0;
background-color: #ddd;
padding: 10px;
border-radius: 5px;
}
nav a {
margin: 0 10px;
text-decoration: none;
color: #333;
font-weight: bold;
}
nav a:hover {
color: #007BFF;
}
section {
margin-bottom: 30px;
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 8px rgba(0,0,0,0.1);
}
h1, h2, h3 {
color: #222;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 15px;
}
table, th, td {
border: 1px solid #aaa;
}
th, td {
padding: 10px;
text-align: left;
}
th {
background-color: #eee;
}
ul, ol {
margin-left: 20px;
}
form {
margin-top: 15px;
}
label {
display: block;
margin: 8px 0 4px;
}
input[type="text"], input[type="email"], select, textarea {
width: 100%;
padding: 8px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
margin-top: 12px;
padding: 10px 15px;
background-color: #007BFF;
border: none;
color: white;
border-radius: 4px;
cursor: pointer;
font-size: 1em;
}
button:hover {
background-color: #0056b3;
}
.highlight {
background-color: #ffffcc;
padding: 5px;
border-radius: 3px;
}
blockquote {
border-left: 4px solid #007BFF;
margin: 20px 0;
padding-left: 15px;
color: #555;
font-style: italic;
background-color: #f9f9f9;
}
.code-sample {
background-color: #272822;
color: #f8f8f2;
padding: 15px;
border-radius: 5px;
font-family: 'Courier New', Courier, monospace;
overflow-x: auto;
margin-top: 15px;
}
</style>
</head>
<body>
<header>
<h1>Random HTML Test Page</h1>
<p>Generated for testing purposes</p>
</header>
<nav>
<a href="#section1">Introduction</a>
<a href="#section2">Features</a>
<a href="#section3">Data Table</a>
<a href="#section4">Form</a>
<a href="#section5">Code Sample</a>
</nav>
<section id="section1">
<h2>Introduction</h2>
<p>Welcome to this randomly generated HTML document. It contains a variety of elements to help you test your HTML parser, renderer, or any other tool that works with HTML content.</p>
<p>Here is a list of some common HTML elements included:</p>
<ul>
<li>Headings (h1, h2, h3)</li>
<li>Paragraphs and text formatting</li>
<li>Lists (ordered and unordered)</li>
<li>Tables with headers and data</li>
<li>Forms with inputs, selects, and buttons</li>
<li>Blockquotes and code samples</li>
</ul>
<p class="highlight">This paragraph is highlighted to test CSS class styling.</p>
<blockquote cite="https://www.w3.org/TR/html52/">
"HTML is the standard markup language for creating Web pages." - W3C
</blockquote>
</section>
<section id="section2">
<h2>Features</h2>
<h3>Text Formatting</h3>
<p>You can <strong>bold</strong> text, <em>italicize</em> it, or <u>underline</u> it. You can also use <code>inline code</code> within paragraphs.</p>
<p>Here is a nested list example:</p>
<ol>
<li>First item
<ul>
<li>Subitem A</li>
<li>Subitem B</li>
</ul>
</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<p>Links can be <a href="https://example.com" target="_blank" rel="noopener noreferrer">external</a> or <a href="#section1">internal</a>.</p>
</section>
<section id="section3">
<h2>Data Table</h2>
<table>
<thead>
<tr>
<th>Product</th>
<th>Price</th>
<th>Quantity</th>
<th>In Stock</th>
</tr>
</thead>
<tbody>
<tr>
<td>Widget A</td>
<td>$10.00</td>
<td>15</td>
<td>Yes</td>
</tr>
<tr>
<td>Widget B</td>
<td>$12.50</td>
<td>7</td>
<td>No</td>
</tr>
<tr>
<td>Widget C</td>
<td>$9.99</td>
<td>23</td>
<td>Yes</td>
</tr>
<tr>
<td>Widget D</td>
<td>$15.00</td>
<td>0</td>
<td>No</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3" style="text-align:right;"><strong>Total Products:</strong></td>
<td>4</td>
</tr>
</tfoot>
</table>
</section>
<section id="section4">
<h2>Sample Form</h2>
<form action="/submit" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Your full name" required />
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="you@example.com" required />
<label for="reason">Reason for Contact:</label>
<select id="reason" name="reason" required>
<option value="">--Please choose an option--</option>
<option value="support">Support</option>
<option value="sales">Sales</option>
<option value="feedback">Feedback</option>
<option value="other">Other</option>
</select>
<label for="message">Message:</label>
<textarea id="message" name="message" rows="5" placeholder="Write your message here..." required></textarea>
<button type="submit">Send Message</button>
</form>
</section>
<section id="section5">
<h2>Code Sample</h2>
<p>Below is a sample of HTML code displayed inside a styled code block:</p>
<pre class="code-sample">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Sample</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is a sample paragraph.</p>
</body>
</html>
</pre>
</section>
<footer>
<p>© 2024 Random HTML Test Document. All rights reserved.</p>
</footer>
</body>
</html>