Sure! Here's a large chunk of random HTML code (around 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.
<!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: #f9f9f9;
color: #333;
}
header, footer {
background: #004080;
color: white;
padding: 10px 20px;
text-align: center;
}
nav ul {
list-style: none;
padding: 0;
display: flex;
gap: 15px;
justify-content: center;
background: #e0e0e0;
margin: 0 0 20px 0;
}
nav ul li {
padding: 8px 12px;
background: #0073e6;
border-radius: 4px;
}
nav ul li a {
color: white;
text-decoration: none;
font-weight: bold;
}
section {
background: white;
padding: 20px;
margin-bottom: 20px;
border-radius: 6px;
box-shadow: 0 0 8px rgba(0,0,0,0.1);
}
h1, h2, h3 {
color: #004080;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 15px;
}
table, th, td {
border: 1px solid #ccc;
}
th, td {
padding: 10px;
text-align: left;
}
th {
background: #0073e6;
color: white;
}
form {
margin-top: 15px;
}
label {
display: block;
margin-bottom: 6px;
font-weight: bold;
}
input[type="text"], input[type="email"], select, textarea {
width: 100%;
padding: 8px;
margin-bottom: 12px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
background: #0073e6;
color: white;
border: none;
padding: 10px 18px;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background: #005bb5;
}
.highlight {
background: #ffffcc;
padding: 5px 10px;
border-left: 4px solid #ffcc00;
margin-bottom: 15px;
}
.flex-container {
display: flex;
gap: 20px;
flex-wrap: wrap;
}
.flex-item {
background: #e6f0ff;
padding: 15px;
border-radius: 6px;
flex: 1 1 200px;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
blockquote {
border-left: 4px solid #0073e6;
margin: 20px 0;
padding-left: 15px;
color: #555;
font-style: italic;
background: #f0f8ff;
border-radius: 4px;
}
code {
background: #eee;
padding: 2px 6px;
border-radius: 3px;
font-family: monospace;
}
pre {
background: #eee;
padding: 15px;
border-radius: 6px;
overflow-x: auto;
}
</style>
</head>
<body>
<header>
<h1>Random HTML Test Page</h1>
<p>Generated for testing purposes</p>
</header>
<nav>
<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#data">Data Table</a></li>
<li><a href="#form">Contact Form</a></li>
<li><a href="#quotes">Quotes</a></li>
</ul>
</nav>
<section id="intro">
<h2>Introduction</h2>
<p>Welcome to this randomly generated HTML document. It contains a variety of elements to help you test rendering, styling, and layout capabilities of your environment.</p>
<p class="highlight">This paragraph is highlighted to draw attention to important information.</p>
<p>Here is a list of some random items:</p>
<ul>
<li>Item One</li>
<li>Item Two with <strong>bold text</strong> and <em>emphasis</em></li>
<li>Item Three with a <a href="https://example.com" target="_blank" rel="noopener">link</a></li>
<li>Item Four with nested list:
<ol>
<li>Nested One</li>
<li>Nested Two</li>
<li>Nested Three</li>
</ol>
</li>
</ul>
</section>
<section id="features">
<h2>Features</h2>
<div class="flex-container">
<div class="flex-item">
<h3>Responsive Design</h3>
<p>The layout adjusts to different screen sizes using flexible boxes and media queries.</p>
</div>
<div class="flex-item">
<h3>Semantic HTML</h3>
<p>Proper use of HTML5 semantic elements like <code><section></code>, <code><nav></code>, and <code><header></code>.</p>
</div>
<div class="flex-item">
<h3>Accessible Forms</h3>
<p>Labels are associated with inputs for better accessibility.</p>
</div>
</div>
</section>
<section id="data">
<h2>Data Table</h2>
<p>Below is a sample table with some random data:</p>
<table>
<thead>
<tr>
<th>Product</th>
<th>Category</th>
<th>Price</th>
<th>In Stock</th>
</tr>
</thead>
<tbody>
<tr>
<td>Widget A</td>
<td>Gadgets</td>
<td>$19.99</td>
<td>Yes</td>
</tr>
<tr>
<td>Gizmo B</td>
<td>Widgets</td>
<td>$29.99</td>
<td>No</td>
</tr>
<tr>
<td>Thingamajig C</td>
<td>Doohickeys</td>
<td>$9.99</td>
<td>Yes</td>
</tr>
<tr>
<td>Contraption D</td>
<td>Gadgets</td>
<td>$49.99</td>
<td>Limited</td>
</tr>
</tbody>
</table>
</section>
<section id="form">
<h2>Contact Form</h2>
<form action="#" method="post" novalidate>
<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="subject">Subject:</label>
<select id="subject" name="subject" required>
<option value="">-- Please choose an option --</option>
<option value="general">General Inquiry</option>
<option value="support">Support</option>
<option value="feedback">Feedback</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="quotes">
<h2>Quotes</h2>
<blockquote>
"The only way to do great work is to love what you do." – Steve Jobs
</blockquote>
<blockquote>
"Life is what happens when you're busy making other plans." – John Lennon
</blockquote>
<blockquote>
"Do not watch the clock. Do what it does. Keep going." – Sam Levenson
</blockquote>
<pre><code><!-- Sample HTML snippet -->
<div class="example">
<p>This is a code block inside a pre tag.</p>
</div>
</code></pre>
</section>
<footer>
<p>© 2024 Random HTML Test Document. All rights reserved.</p>
</footer>
</body>
</html>
Feel free to save this as an .html file and open it in any browser to test rendering, styling, or parsing. Let me know if you want me to generate something else or add JavaScript or other features!