text
stringlengths
69
2.38k
<s>[INST] <<SYS>> Write an HTML template to display a greeting message. The message should include the name of the user who visits the website. <</SYS>> username = "John" [/INST] <html> <head> <title>Greeting Message</title> </head> <body> <h1>Hello, {{ username }}!</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page where the main content area has a random background color when the page is loaded. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>RandomBackground</title> <script> window.addEventListener("load",function(){ var randomColor = "#"+((1<<24)*Math.random()|0).toString(16); document.querySelector("body").style.background = randomColor; }); </script> </head> <body> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page using HTML and CSS that displays a div with some text. <</SYS>> [/INST] <html> <head> <title>Div Example</title> </head> <body> <div>Hello, welcome to my website!</div> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page with a centered title and paragraph in HTML. <</SYS>> title = "My First Web Page" paragraph = "This is my first web page. It is an amazing experience!" [/INST] <!DOCTYPE html> <html> <head> <title>My First Web Page</title> </head> <body> <div class="main"> <h1 align="center">My First Web Page</h1> <p align="center">This is my first web page. It is an amazing experience!</p> </div> </body> </html> </s>
<s>[INST] <<SYS>> Correct the following HTML code to remove mistakes and indentation errors <</SYS>> `<html><head><title>My Site</title></head> <body> <h1>Welcome!</h1><p>My website </body> </html>` [/INST] <html> <head> <title>My Site</title> </head> <body> <h1>Welcome!</h1> <p>My website</p> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page with 3 sections, using div tags. <</SYS>> [/INST] <div> <div id="section1"> Section 1... </div> <div id="section2"> Section 2... </div> <div id="section3"> Section 3... </div> </div> </s>
<s>[INST] <<SYS>> Create an HTML page to display a table of students <</SYS>> Data of students: First name, LastName and Age [/INST] <html> <head> <title>My Student Table </title> </head> <body> <table> <thead> <tr> <th>First Name</th> <th>Last Name</th> <th>Age</th> </tr> </thead> <tbody> {% for firstName, lastName, age in studentsList %} <tr> <td>{{ firstName }}</td> <td>{{ lastName }}</td> <td>{{ age }}</td> </tr> {% endfor %} </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Improve the following HTML structure. <</SYS>> <div> <h2>Welcome!</h2> <p>This is my website.</p> </div> [/INST] <div> <h2>Welcome!</h2> <p>Hello and welcome to my website. Here, you can find all the information you need to know about me.</p> </div> </s>
<s>[INST] <<SYS>> Design a webpage with a given template. <</SYS>> Template: Pink and Purple with three-column layout [/INST] <html> <head> <title>Pink and Purple Layout</title> <style> body { background-color: pink; } #container { display: flex; } #container > div { flex: 1; background-color: purple; } </style> </head> <body> <div id="container"> <div></div> <div></div> <div></div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page that displays the words "Hello, World!" in different colors. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Hello World Page</title> <style> h1 { color: red; } h2 { color: blue; } h3 { color: green; } </style> </head> <body> <h1>Hello, World!</h1> <h2>Hello, World!</h2> <h3>Hello, World!</h3> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page with a heading 2 of "Operating System". <</SYS>> [/INST] <html> <head> <title>Operating System</title> </head> <body> <h2>Operating System</h2> </body> </html> </s>
<s>[INST] <<SYS>> Write an HTML page including the given text. <</SYS>> This is a test page [/INST] <html> <head> <title>Test Page</title> </head> <body> <h1>This is a test page</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create a simple web page with a div element and a child paragraph element. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Simple Web Page</title> </head> <body> <div> <p>The quick brown fox jumps over the lazy dog.</p> </div> </body> </html> </s>
<s>[INST] <<SYS>> Design an HTML page with a table of products and their prices. <</SYS>> Table with 5 products and their prices [/INST] <html> <head> <title>Product Prices</title> </head> <body> <h1>Product Prices</h1> <table> <tr> <th>Product Name</th><th>Price</th> </tr> <tr> <td>Laptop</td><td>1000</td> </tr> <tr> <td>Keyboard</td><td>50</td> </tr> <tr> <td>Monitor</td><td>200</td> </tr> <tr> <td>Mouse</td><td>30</td> </tr> <tr> <td>Headphones</td><td>50</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create a PHP page to add two numbers. <</SYS>> [/INST] <html> <head> <title>Add two numbers</title> </head> <body> <?php if (isset($_POST['add'])) { $num1 = $_POST['num1']; $num2 = $_POST['num2']; $sum = $num1 + $num2; ?> <p>The sum of <?php echo $num1; ?> and <?php echo $num2; ?> is <?php echo $sum; ?></p> <?php } else { ?> <form action="add.php" method="post"> <label>Enter first number:</label> <input type="text" name="num1"> <br> <label>Enter second number:</label> <input type="text" name="num2"> <input type="submit" name="add" value="Add"> </form> <?php } ?> </body> </html> </s>
<s>[INST] <<SYS>> Modify the following HTML to apply an external style sheet. <</SYS>> <html> <head> <title>This Is a Test</title> </head> <body> <h1>Hello World!</h1> </body> </html> [/INST] <!DOCTYPE html> <html> <head> <title>This Is a Test</title> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <h1>Hello World!</h1> </body> </html> </s>
<s>[INST] <<SYS>> Construct a HTML code which opens a popup window. <</SYS>> [/INST] <html> <head> <title>Popup Window</title> </head> <body> <!-- Trigger/Open The Modal --> <button id="myBtn">Open Popup Window</button> <!-- The Modal --> <div id="myModal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="close">&times;</span> <p>This is the popup window!</p> </div> </div> <script> // Get the modal var modal = document.getElementById("myModal"); // Get the button that opens the modal var btn = document.getElementById("myBtn"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks the button, open the modal btn.onclick = function() { modal.style.display = "block"; } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } </script> </body> </html> </s>
<s>[INST] <<SYS>> Write an HTML page that displays a red box. <</SYS>> [/INST] <html> <head> <title>Red Box</title> </head> <body> <div style="width: 200px;height: 200px;background-color: red;"></div> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page containing a text field and a button. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Input Form</title> </head> <body> <form> <input type="text" /> <input type="submit" value="Submit" /> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create a basic HTML structure including an h1 titled "Welcome". <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Welcome</title> </head> <body> <h1>Welcome</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a form that validates a user's email address. <</SYS>> [/INST] <html> <head> <title>Email Validation Form</title> </head> <body> <h1>Email Validation Form</h1> <form action="/" method="POST"> <input type="text" name="email" placeholder="Enter your email address"> <button type="submit">Submit</button> </form> <script> let inputField = document.querySelector('input'); inputField.addEventListener('input', function() { let emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; let isEmailValid = inputField.value.match(emailRegex); inputField.style.borderColor = (isEmailValid) ? "green" : "red"; }); </script> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page that containsthe loading icon for a web page request. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Loading Icon</title> </head> <body> <div id="loading-icon"> <span></span> <span></span> <span></span> <span></span> <span></span> </div> <style type="text/css"> #loading-icon { margin: auto; text-align: center; width: 120px; } #loading-icon span { background-color: #E3EEF6; border-radius: 50%; display: inline-block; height: 10px; margin-right: 10px; width: 10px; animation: loader 2s ease-in infinite; } #loading-icon span:nth-child(1) { animation-delay: 0s; } #loading-icon span:nth-child(2) { animation-delay: 0.3s; } #loading-icon span:nth-child(3) { animation-delay: 0.6s; } #loading-icon span:nth-child(4) { animation-delay: 0.9s; } #loading-icon span:nth-child(5) { animation-delay: 1.2s; } @keyframes loader { 25% { transform: scale(1.3); } 50% { transform: scale(1.1); } 75% { transform: scale(1.3); } } </style> </body> </html> </s>
<s>[INST] <<SYS>> Edit the following HTML code to include a new form field. <</SYS>> <html> <head> <title>My Form</title> </head> <body> <form> <label for="name">Name</label> <input type="text" id="name"> </form> </body> </html> [/INST] <html> <head> <title>My Form</title> </head> <body> <form> <label for="name">Name</label> <input type="text" id="name"> <label for="address">Address</label> <input type="text" id="address"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page with a form for user input of a modified text. <</SYS>> [/INST] <html> <body> <form action = "processText.php" method = "post"> <textarea rows = "10" cols = "30" name = "modifiedText"></textarea><br> <input type = "submit" value = "Submit" /> </form> </body> </html> </s>
<s>[INST] <<SYS>> Format the following HTML code into a valid HTML document. <</SYS>> <title>My Website!</title><h1>Welcome</h1> [/INST] <html> <head> <title>My Website!</title> </head> <body> <h1>Welcome</h1> </body> </html> </s>
<s>[INST] <<SYS>> Edit this HTML document so the <h1> tag at the top of the page is aligned to the center. <</SYS>> <html> <head> <title>My Page</title> </head> <body> <h1>Page Title</h1> </body> </html> [/INST] <html> <head> <title>My Page</title> </head> <body> <h1 style="text-align: center;">Page Title</h1> </body> </html> </s>
<s>[INST] <<SYS>> Write a HTML page to create a survey form. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Survey Form</title> </head> <body> <form action="/action_page.php"> <label for="name">Name:</label><br> <input type="text" id="name" name="name" placeholder="Your name.." required><br> <label for="email">Email:</label><br> <input type="text" id="email" name="email" placeholder="Your email.." required><br> <label for="age">Age:</label><br> <input type="number" id="age" name="age" placeholder="Your age.." required><br><br> <fieldset> <legend>Gender:</legend> <input type="radio" id="male" name="gender" value="male" checked> <label for="male">Male</label><br> <input type="radio" id="female" name="gender" value="female"> <label for="female">Female</label><br> <input type="radio" id="other" name="gender" value="other"> <label for="other">Other</label><br> </fieldset> <fieldset> <legend>Interests:</legend> <input type="checkbox" id="tech" name="tech" value="tech"> <label for="tech">Technology</label><br> <input type="checkbox" id="sport" name="sport" value="sport"> <label for="sport">Sports</label><br> <input type="checkbox" id="science" name="science" value="science"> <label for="science">Science</label><br> </fieldset><br> <label for="comment">Comment:</label><br> <textarea id="comment" name="comment" placeholder="Write something.." style="height:90px"></textarea> <br><br> <input type="submit" value="Submit"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page displaying a table with the following values <</SYS>> [{name: 'John', age: 25, country: 'US'}, {name: 'Jane', age: 32, country: 'Canada'}, {name: 'David', age: 28, country: 'Mexico'}] [/INST] <html> <head> <title>Table</title> </head> <body> <table> <thead> <tr> <th>Name</th> <th>Age</th> <th>Country</th> </tr> </thead> <tbody> <tr> <td>John</td> <td>25</td> <td>US</td> </tr> <tr> <td>Jane</td> <td>32</td> <td>Canada</td> </tr> <tr> <td>David</td> <td>28</td> <td>Mexico</td> </tr> </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page with a search bar. <</SYS>> [/INST] <html> <body> <h1>Search Page</h1> <form action="search.php" type="GET"> <input type="text" name="text"/> <input type="submit" name="submit" value="Search"/> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page with text "Hello, World!" <</SYS>> [/INST] <html> <head> <title>Hello, World!</title> </head> <body> <h1>Hello, World!</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page with a table containing five columns and four rows. <</SYS>> [/INST] <html> <head> <title>Table with Columns and Rows</title> </head> <body> <table> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th>Column 4</th> <th>Column 5</th> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> <td>Cell 5</td> </tr> <tr> <td>Cell 6</td> <td>Cell 7</td> <td>Cell 8</td> <td>Cell 9</td> <td>Cell 10</td> </tr> <tr> <td>Cell 11</td> <td>Cell 12</td> <td>Cell 13</td> <td>Cell 14</td> <td>Cell 15</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that has an input field and a button. When the button is clicked, the text from the input field should be printed to the console. <</SYS>> [/INST] <html> <head> </head> <body> <input type="text" id="myInput"> <button onclick="printInput()">Print Input</button> <script> function printInput(){ const inputVal = document.getElementById("myInput").value; console.log(inputVal); } </script> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML form which accepts an input string and returns the longest word in the string <</SYS>> Hello world! [/INST] <html> <head> <title>Longest word finder</title> <script type="text/javascript"> function longestWordFinder() { // Get user input const inputString = document.getElementById("inputString").value; // Split the input string into an array of words let words = inputString.split(" "); // Iterate through the words array and find the longest word let longestWord = words[0]; for (let i = 1; i < words.length; i++) { if (words[i].length > longestWord.length) longestWord = words[i]; } // Display the result document.getElementById("result").innerHTML = longestWord; } </script> </head> <body> <h1>Longest Word Finder</h1> <input type="text" id="inputString" /> <button type="submit" onclick="longestWordFinder()">Submit</button> <p>The longest word is: <span id="result"></span></p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a table that displays the given data. <</SYS>> Dessert | Calories Chocolate Cake | 450 Ice Cream Sundae | 300 Donut | 350 [/INST] <html> <head> <title>Calorie Table</title> </head> <body> <h1>Calorie Table</h1> <table> <thead> <th>Dessert</th> <th>Calories</th> </thead> <tbody> <tr> <td>Chocolate Cake</td> <td>450</td> </tr> <tr> <td>Ice Cream Sundae</td> <td>300</td> </tr> <tr> <td>Donut</td> <td>350</td> </tr> </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a form to sign up for a newsletter. <</SYS>> [/INST] <html> <head> <title>Newsletter Sign Up</title> </head> <body> <form action="submit.html" method="POST"> <h1>Newsletter Sign Up</h1> Name: <input type="text" name="name"><br> Email: <input type="email" name="email"><br> <input type="submit" value="Submit"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that displays a table of the 10 most visited countries. <</SYS>> Country | Number of Visitors United States| 206 million China | 61 million Spain | 82 million United Kingdom | 37 million Germany | 37 million France | 86 million Italy | 58 million Turkey | 39 million Japan | 28 million Russia | 28 million [/INST] <html> <head> <title>Top 10 Visited Countries</title> </head> <body> <h1>Top 10 Visited Countries</h1> <table> <thead> <th>Country</th> <th>Number of Visitors</th> </thead> <tbody> <tr> <td>United States</td> <td>206 million</td> </tr> <tr> <td>China</td> <td>61 million</td> </tr> <tr> <td>Spain</td> <td>82 million</td> </tr> <tr> <td>United Kingdom</td> <td>37 million</td> </tr> <tr> <td>Germany</td> <td>37 million</td> </tr> <tr> <td>France</td> <td>86 million</td> </tr> <tr> <td>Italy</td> <td>58 million</td> </tr> <tr> <td>Turkey</td> <td>39 million</td> </tr> <tr> <td>Japan</td> <td>28 million</td> </tr> <tr> <td>Russia</td> <td>28 million</td> </tr> </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML webpage which displays a list of products. <</SYS>> [/INST] <html> <head> <title>List Of Products</title> </head> <body> <ul> <li>Product 1</li> <li>Product 2</li> <li>Product 3</li> </ul> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page to display a form to enter email and password. <</SYS>> [/INST] <html> <head> <title>Login Form</title> </head> <body> <h1>Login Form</h1> <form> Email: <input type="text" name="email" /><br /> Password: <input type="password" name="pwd" /><br /> <input type="submit" value="Submit" /> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page using JavaScript that generates a table with the following data. <</SYS>> const data = [ { name: "John Doe", age: 30, city: "New York" }, { name: "Jane Smith", age: 25, city: "San Francisco" }, { name: "Adam Johnson", age: 27, city: "Los Angeles" } ]; [/INST] <html> <head> <script> function generateTable() { const data = [ { name: "John Doe", age: 30, city: "New York" }, { name: "Jane Smith", age: 25, city: "San Francisco" }, { name: "Adam Johnson", age: 27, city: "Los Angeles" } ]; let table = document.createElement('table'); // Add Table Headers let tableHeaders = "<tr>"; ["Name","Age","City"].forEach(header => { tableHeaders += `<th>${header}</th>`; }); tableHeaders += "</tr>"; table.innerHTML = tableHeaders; //Add Table Rows data.forEach(datum => { let tableRow = document.createElement('tr'); for (let key in datum) { let tableData = document.createElement('td'); tableData.innerText = datum[key]; tableRow.appendChild(tableData); } table.appendChild(tableRow); }); document.getElementById('table-container').appendChild(table); } </script> </head> <body> <div id="table-container"></div> <script> generateTable(); </script> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page using a basic text editor <</SYS>> [/INST] <html> <head> <title>My Title</title> </head> <body> <h1>Hello World!</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page displaying a table of the 10 most disruptive technologies of all time. <</SYS>> [/INST] <html> <head> <title>Most Disruptive Technologies</title> </head> <body> <h1>Ten Most Disruptive Technologies Of All Time</h1> <table> <tr> <th>Technology</th> <th>Description</th> </tr> <tr> <td>The Internet</td> <td>A worldwide computer network providing a variety of information and communication facilities.</td> </tr> <tr> <td>Smartphones</td> <td>A mobile device that combines the functions of a mobile phone, personal digital assistant, and digital camera.</td> </tr> <tr> <td>The Automobile</td> <td>A motor vehicle with four wheels, powered by an internal combustion engine and able to carry a small number of people.</td> </tr> <tr> <td>Electricity</td> <td>The presence and flow of electric charge.</td> </tr> <tr> <td>The Airplane</td> <td>A powered aircraft that is heavier than air, propelled by one or more engines, and capable of sustained, rising flight in the atmosphere.</td> </tr> <tr> <td>The Computer</td> <td>A machine for performing calculations automatically.</td> </tr> <tr> <td>The Steam Engine</td> <td>A device for converting the thermal energy of steam into mechanical work or electricity.</td> </tr> <tr> <td>Medical Imaging</td> <td>A medical imaging technology that produces visual representations of the inside of a body for medical analysis.</td> </tr> <tr> <td>The Telephone</td> <td>A device that converts sound, typically and most efficiently the human voice, into electrical signals.</td> </tr> <tr> <td>Printing Press</td> <td>A press used for printing from a plate or block that bears the design to be printed.</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Construct an HTML page with a title "My Website" and a header tag. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>My Website</title> </head> <body> <h1>My Website</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a table and list 3 books in it. <</SYS>> [/INST] <html> <head> <title>Books</title> </head> <body> <table> <thead> <tr> <th>Title</th> <th>Author</th> </tr> </thead> <tbody> <tr> <td>The Catcher in the Rye</td> <td>J. D. Salinger</td> </tr> <tr> <td>The Great Gatsby</td> <td>F. Scott Fitzgerald</td> </tr> <tr> <td>To Kill a Mockingbird</td> <td>Harper Lee</td> </tr> </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML layout for a website. Make sure the layout has a header, a navigation menu, and a footer. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Webpage Layout</title> </head> <body> <header> <h1>Header</h1> </header> <nav> <ul> <li>Home</li> <li>About</li> <li>Contact</li> <li>FAQ</li> </ul> </nav> <footer> <p>Footer</p> </footer> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML5 document with an h1 tag containing the text "Hello World". <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Hello World</title> </head> <body> <h1>Hello World</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page using HTML, CSS and JavaScript that displays a user's full name. <</SYS>> const fullName = "John Doe"; [/INST] <!DOCTYPE html> <html> <head> <title>My First Webpage</title> </head> <body> <h1>My Full Name</h1> <p>My full name is <span id="name">John Doe</span>.</p> <script> const fullName = "John Doe"; document.getElementById('name').innerHTML = fullName; </script> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page displaying a simple table showing your name, age and occupation. <</SYS>> [/INST] <html> <head> <title>My Details</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> <th>Occupation</th> </tr> <tr> <td> Joe Doe</td> <td> 25 </td> <td> Web Developer </td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page containing a table with four columns that holds data about the population of a country. <</SYS>> [/INST] <html> <head> <title>Country Population Table</title> </head> <body> <table> <tr> <th>City</th> <th>State</th> <th>Population</th> <th>Area (sq km)</th> </tr> <tr> <td>New York</td> <td>New York</td> <td>8.4M</td> <td>781</td> </tr> <tr> <td>Los Angeles</td> <td>California</td> <td>3.9M</td> <td>1,214</td> </tr> <tr> <td>Chicago</td> <td>Illinois</td> <td>2.7M</td> <td>606</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Write a function in HTML to display a list of students sorted by their final grade. <</SYS>> var students = [{ name: "Tom", grade: 90 }, { name: "Karl", grade: 75 }, { name: "Kofi", grade: 65 }]; [/INST] <html> <head> <script> function sortStudents(students) { students.sort((a, b) => (a.grade > b.grade) ? 1 : -1); return students; } var sortedStudents = sortStudents(students); document.write('<ul>'); sortedStudents.forEach(student => { document.write('<li>' + student.name + ' - ' + student.grade + '</li>'); }); document.write('<ul>'); </script> </head> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that prints "Hello World!" and displays the examples using a font size of 8px. <</SYS>> [/INST] <html> <head> <title>Hello World!</title> </head> <body> <p style="font-size: 8px;">Hello World!</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML document that displays a list of 5 items. <</SYS>> List of items: Apple Banana Orange Kiwi Mango [/INST] <html> <body> <ul> <li>Apple</li> <li>Banana</li> <li>Orange</li> <li>Kiwi</li> <li>Mango</li> </ul> </body> </html> </s>
<s>[INST] <<SYS>> Edit the following HTML page and add a link to an existing page on the internet. <</SYS>> <html> <header> <title>My Page</title> </header> </html> [/INST] <html> <header> <title>My Page</title> </header> <body> <a href="https://www.example.com">Link to Example</a> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML document with a table containing book information. <</SYS>> [/INST] <html> <body> <h2>Book Information</h2> <table> <tr> <th>Title</th> <th>Author</th> <th>Price</th> </tr> <tr> <td>Harry Potter and the Sorcerer's Stone</td> <td>J.K. Rowling</td> <td>$10.99</td> </tr> <tr> <td>The Cat in the Hat</td> <td>Dr. Seuss</td> <td>$7.99</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Write an HTML page with a form which takes the input of an email address and a password and sends an email to the given address. <</SYS>> [/INST] <html> <head> <title>Form Email</title> <meta charset="utf-8" /> </head> <body> <form method="post" action="send-email.php"> <label>Email: <input type="text" name="email" /> </label> <label>Password: <input type="password" name="password" /> </label> <input type="submit" value="Send Email" /> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that includes a form. <</SYS>> The form should have inputs for a first name, last name, email, favorite color, and a submit button. [/INST] <html> <body> <form action="" method="post"> First Name: <input type="text" name="firstname"><br> Last Name: <input type="text" name="lastname"><br> Email: <input type="text" name="email"><br> Favorite Color: <input type="text" name="favoritecolor"><br> <input type="submit" value="Submit"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML web page that displays "Welcome To My Page" with a heading level 2. <</SYS>> [/INST] <html> <head> <title>Welcome To My Page</title> </head> <body> <h2>Welcome To My Page</h2> </body> </html> </s>
<s>[INST] <<SYS>> Write a number of HTML tags such that their end tags are mismatched. <</SYS>> [/INST] <html> <head> <title>Test</title> </head> <body> <h1>My Heading</h1> <p>This is a test. </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML webpage to display a welcome message. <</SYS>> [/INST] <html> <head> <title>Welcome</title> </head> <body> <h1>Welcome!</h1> </body> </html> </s>
<s>[INST] <<SYS>> Write an HTML webpage to display a table with employee details. <</SYS>> [/INST] <html> <head> <title>Employee Details</title> </head> <body> <h2>Employee Details</h2> <table> <thead> <tr> <th>Name</th> <th>Age</th> <th>Salary</th> </tr> </thead> <tbody> <tr> <td>John</td> <td>30</td> <td>50,000</td> </tr> <tr> <td>Alice</td> <td>27</td> <td>45,000</td> </tr> <tr> <td>Vinod</td> <td>35</td> <td>70,000</td> </tr> </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page to display the attendance of students in an academic year. <</SYS>> Attendance Data: Student Name: John Doe Attendance in 2020-21 academic year - 91%. Student Name: Jane Smith Attendance in 2020-21 academic year - 94%. [/INST] <!DOCTYPE html> <html> <head> <title> Student Attendance </title> <style type="text/css"> h1 { font-family: sans-serif; } table { font-family: sans-serif; border-collapse: collapse; } td { border: 1px solid #dddddd; padding: 8px; } </style> </head> <body> <h1> Student Attendance </h1> <table> <tr> <th>Student Name</th> <th>Attendance (%)</th> </tr> <tr> <td>John Doe</td> <td>91%</td> </tr> <tr> <td>Jane Smith</td> <td>94%</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page to display a weather forecast for the selected city. <</SYS>> City: London Weather Forecast: Day 1 - Clear Sky Day 2 - Cloudy Day 3 - Rain [/INST] <!DOCTYPE html> <html> <head> <title>Weather Forecast</title> </head> <body> <h1>Weather Forecast - London</h1> <p>Day 1 - Clear Sky</p> <p>Day 2 - Cloudy</p> <p>Day 3 - Rain</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that displays "Welcome to our website" when you first visit the page <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Welcome to our website</title> </head> <body> <h1>Welcome to our website!</h1> </body> </s>
<s>[INST] <<SYS>> Create an HTML page that displays a table with names, ages, and phone numbers <</SYS>> Name: John Age: 25 Phone: 555-555-5555 Name: Jane Age: 32 Phone: 333-333-3333 [/INST] <!DOCTYPE html> <html> <head> <title>Table of Names and Information</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> <th>Phone</th> </tr> <tr> <td>John</td> <td>25</td> <td>555-555-5555</td> </tr> <tr> <td>Jane</td> <td>32</td> <td>333-333-3333</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that contains the following table. <</SYS>> <table> <tr> <th>Name</th> <th>Age</th> <th>City</th> </tr> <tr> <td>John Doe</td> <td>23</td> <td>New York</td> </tr> <tr> <td>Trish Smith</td> <td>29</td> <td>Philadelphia</td> </tr> </table> [/INST] <html> <head> <title>Table Sample</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> <th>City</th> </tr> <tr> <td>John Doe</td> <td>23</td> <td>New York</td> </tr> <tr> <td>Trish Smith</td> <td>29</td> <td>Philadelphia</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Edit the following HTML page so the text appears in bold. <</SYS>> <html> <head> <title>Text Sample</title> </head> <body> <p>This is a sample text.</p> </body> </html> [/INST] <html> <head> <title>Text Sample</title> </head> <body> <p><b>This is a sample text.</b></p> </body> </html> </s>
<s>[INST] <<SYS>> Construct an HTML page using valid HTML markup. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>My First HTML Page</title> </head> <body> <h1>Hello World!</h1> <p>This is my first HTML page.</p> </body> </html> </s>
<s>[INST] <<SYS>> You are given a code snippet of a web page. Fill in the missing tags to make it valid HTML. <</SYS>> <html> <head> <title>My Homepage</title> </head> <body> <h1>Welcome to My Homepage</h1> <p>Hello, I'm John and this is my homepage. This is where I share my interests with the world.</p> </body> </html> [/INST] <html> <head> <title>My Homepage</title> </head> <body> <h1>Welcome to My Homepage</h1> <p>Hello, I'm John and this is my homepage. This is where I share my interests with the world.</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page to display a table with 2 columns: Description and Price. <</SYS>> [/INST] <html> <head> <title>Price Table</title> </head> <body> <table> <tr> <th>Description</th> <th>Price</th> </tr> <tr> <td>Item 1</td> <td>$2.99</td> </tr> <tr> <td>Item 2</td> <td>$5.99</td> </tr> <tr> <td>Item 3</td> <td>$9.99</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Update the following line of HTML code to use semantic tags for optimization. <</SYS>> <div>Learn HTML Tutorial here</div> [/INST] <div><h1>Learn HTML Tutorial here</h1></div> </s>
<s>[INST] <<SYS>> Edit the given HTML code to add a footnote section. <</SYS>> <code> <!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <h1>This is a Heading</h1> <p>This is a paragraph.</p> </body> </html> [/INST] <!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <h1>This is a Heading</h1> <p>This is a paragraph.</p> <footer> <p> Copyright (c) Example.com. All Rights Reserved.</p> </footer> </body> </html> </s>
<s>[INST] <<SYS>> Create a script in HTML to output a horizontal line. <</SYS>> [/INST] <html> <head> <title>Horizontal Line</title> </head> <body> <hr> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML website with navigation, logo and footer. <</SYS>> <ninput> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Website</title> </head> <body> <div class="navbar"> <!-- navigation links here --> </div> <div class="logo"> <!-- logo here --> </div> <div class="main-content"> <!-- page content here --> </div> <div class="footer"> <!-- footer here --> </div> </body> </html> </s>
<s>[INST] <<SYS>> Generate an HTML page with a heading and a paragraph. <</SYS>> [/INST] <html> <head> <title>My page</title> </head> <body> <h1>My Page</h1> <p>This is the content of my page.</p> </body> </html> </s>
<s>[INST] <<SYS>> Clean up the following HTML string so it can be rendered properly. <</SYS>> HTML string: <div> <h1>This is a header</h2> <p>paragraph<p> </div> [/INST] <div> <h1>This is a header</h1> <p>paragraph</p> </div> </s>
<s>[INST] <<SYS>> Write an HTML page that displays a single line of text saying "Hello World". <</SYS>> [/INST] <html> <head> <title>Hello World</title> </head> <body> <p>Hello World</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a navigation bar that links to three other HTML pages. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>My Navigation Page</title> </head> <body> <div> <a href="page1.html">Page 1</a> <a href="page2.html">Page 2</a> <a href="page3.html">Page 3</a> </div> </body> </html> </s>
<s>[INST] <<SYS>> Create a CSS stylesheet that colors the background of a webpage with a random color whenever the page is refreshed. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Random Background</title> <style type="text/css"> body { background-color: <?php echo '#'.str_pad(dechex(mt_rand(0, 0xFFFFFF)), 6, '0', STR_PAD_LEFT); ?>; } </style> </head> <body> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page to list the students in a class list in a table. <</SYS>> [/INST] <html> <head> <title>Class List</title> </head> <body> <h2>Class List</h2> <table> <tr> <th>Name</th><th>Age</th><th>Gender</th> </tr> <tr> <td>John Doe</td><td>21</td><td>Male</td> </tr> <tr> <td>Catrine Smith</td><td>18</td><td>Female</td> </tr> <tr> <td>John Wilkins</td><td>19</td><td>Male</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Reformat the following HTML code to make it better readable. <</SYS>> <div><ul><li>Item 1</li><li>Item 2</li></ul></div> [/INST] <div> <ul> <li>Item 1</li> <li>Item 2</li> </ul> </div> </s>
<s>[INST] <<SYS>> Create a HTML web page which shows the news for the day. <</SYS>> [/INST] <html> <head> <title>Today's News</title> </head> <body> <h1>Today's News</h1> <div class="news-container"> <div class="news-article"> ... </div> <div class="news-article"> ... </div> <div class="news-article"> ... </div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Edit the following HTML code snippet to give the <body> tag the class 'main'. <</SYS>> <html> <head> <title>Page Title</title> </head> </html> [/INST] <html> <head> <title>Page Title</title> </head> <body class="main"> </body> </html> </s>
<s>[INST] <<SYS>> Design a HTML page to register a new user. <</SYS>> [/INST] <!DOCTYPE html> <html> <body> <h2>User Registration</h2> <form action="/action_page.php"> Username:<br> <input type="text" name="username" value=""><br> Email:<br> <input type="text" name="email" value=""><br><br> <input type="submit" value="Submit"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML web page with four different headings. <</SYS>> [/INST] <html> <head> <title>Headings Page</title> </head> <body> <h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML email template with placeholder information from a JavaScript object. <</SYS>> var data = { firstname: 'John', lastname: 'Doe', email: '[email protected]' }; [/INST] <!DOCTYPE html> <html> <head> <title>Email Template</title> </head> <body> <h1>Hello, {{data.firstname}} {{data.lastname}}!</h1> <p>This is an automated email sent to you at {{data.email}}.</p> <p>Thank you!</p> </body> </html> </s>
<s>[INST] <<SYS>> Use HTML to create a webpage with a text input field and a button. <</SYS>> [/INST] <html> <body> <input type="text" id="text_input" /> <button onclick="handleInput()">Submit</button> </body> </html> </s>
<s>[INST] <<SYS>> Edit the given HTML structure to center the content in the page. <</SYS>> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My First Web Page</title> </head> <body> </body> </html> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My First Web Page</title> </head> <body style ="text-align:center;"> </body> </html> </s>
<s>[INST] <<SYS>> Edit a given HTML string so that every word is displayed in bold. <</SYS>> <div>This is a sample sentence.</div> [/INST] <div> <strong>This</strong> <strong>is</strong> <strong>a</strong> <strong>sample</strong> <strong>sentence.</strong> </div> </s>
<s>[INST] <<SYS>> Design a web page using HTML and CSS. <</SYS>> [/INST] <html> <head> <title>My webpage</title> </head> <body> <h1>Hello World!</h1> <p>Welcome to my webpage.</p> </body> </html> <style> body { font-family: Arial, sans-serif; font-size: 16px; } </style> </s>
<s>[INST] <<SYS>> Write an HTML page to display a given data table. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Table Display</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>John</td> <td>21</td> </tr> <tr> <td>Jane</td> <td>25</td> </tr> <tr> <td>Joe</td> <td>30</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML form that, when submitted, displays all the user input on the same page. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>User Input</title> </head> <body> <h1>User Input</h1> <form action="#" method="post"> <label>Name: </label> <input type="text" name="name" /><br> <label>Email: </label> <input type="email" name="email" /><br> <label>Country: </label> <input type="text" name="country" /><br><br> <input type="submit" value="Submit" name="submit" /> </form> <?php if(isset($_POST['submit'])){ $name = $_POST['name']; $email = $_POST['email']; $country = $_POST['country']; echo "<p>Your name is: $name <br>"; echo "Your email is: $email <br>"; echo "Your country is: $country <br></p>"; } ?> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a table showing the results of the following SQL query: <</SYS>> SELECT student_name, grade FROM students ORDER BY grade DESC [/INST] <html> <head> <title>Student Grades</title> </head> <body> <h2>Student Grades</h2> <table> <thead> <tr> <th>Student Name</th> <th>Grade</th> </tr> </thead> <tbody> <?php // Connect to the database // Run the query // Loop through the results ?> </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Modify the HTML code with the following: Make all the text bold without changing the fontsize. <</SYS>> <div> <h1>Welcome</h1> <p>This is an example text</p> </div> [/INST] <div> <h1><strong>Welcome</strong></h1> <p><strong>This is an example text</strong></p> </div> </s>
<s>[INST] <<SYS>> Please fix the following broken HTML code. <</SYS>> <html> <head> <title>Test HTML Page </head> <body> /body> </html> [/INST] <html> <head> <title>Test HTML Page</title> </head> <body> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that displays a table containing four columns: first name, last name, age, and city. Put your own data into the columns. <</SYS>> [/INST] <html> <head> <title>People Table</title> </head> <body> <table> <tr> <th>First Name</th> <th>Last Name</th> <th>Age</th> <th>City</th> </tr> <tr> <td>John</td> <td>Doe</td> <td>50</td> <td>New York</td> </tr> <tr> <td>Jane</td> <td>Smith</td> <td>41</td> <td>Los Angeles</td> </tr> <tr> <td>Dave</td> <td>Jackson</td> <td>28</td> <td>Boston</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with an input field and a button, and write a JavaScript function that sets the font size of the entered text in the input field to 16pt when the button is clicked. <</SYS>> [/INST] <html> <head> <title>Change Font Size</title> <script type="text/javascript"> function changeFontSize() { var inputField = document.getElementById("inputField"); inputField.style.fontSize = "16pt"; } </script> </head> <body> <input type="text" id="inputField" placeholder="Enter Text Here"> <button type="button" onclick="changeFontSize()">Change Font Size</button> </body> </html> </s>
<s>[INST] <<SYS>> Construct a web page with three columns and a header. <</SYS>> [/INST] <html> <head> <title>Three Column Page</title> </head> <body> <h1> Three Column Page </h1> <div> <div style="float:left;width:33%;"> Content for Column 1 </div> <div style="float:left;width:33%;"> Content for Column 2 </div> <div style="float:left;width:33%;"> Content for Column 3 </div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Construct an HTML page with a table that displays employee information, including name, age, and salary. <</SYS>> [/INST] <html> <head> <title>Employee Information</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> <th>Salary</th> </tr> <tr> <td>John</td> <td>32</td> <td>50000</td> </tr> <tr> <td>Karen</td> <td>30</td> <td>45000</td> </tr> <tr> <td>Bob</td> <td>35</td> <td>55000</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Write a basic HTML structure with a header and a footer <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <header> <!-- Header Content Here --> </header> <main> <!-- Page Content Here --> </main> <footer> <!-- Footer Content Here --> </footer> </body> </html> </s>
<s>[INST] <<SYS>> Write a basic HTML structure with two navigation links <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <header> <nav> <a href="#">Link 1</a> <a href="#">Link 2</a> </nav> </header> </body> </html> </s>
<s>[INST] <<SYS>> Use HTML to create a basic web page which displays a welcome message and a button to redirect the user to another page. <</SYS>> [/INST] <html> <header> <title>Welcome Page</title> </header> <body> <h1>Welcome to My Website</h1> <p>This website offers a variety of resources.</p> <button onclick="window.location.href='anotherpage.html'">Redirect</button> </body> </html> </s>
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
32
Edit dataset card