text
stringlengths
79
2.28k
<|user|> Develop an HTML page which displays a user's profile information (name, age, phone number). </s> <|assistant|> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>User Profile</title> </head> <body> <h1>User Profile</h1> <p>Name: John Doe</p> <p>Age: 24</p> <p>Phone Number: 123-456-789</p> </body> </html></s>
<|user|> Produce HTML output with a yellow background using the following CSS style. .background { background-color: #000; }</s> <|assistant|> <html> <head> <style> .background { background-color: #000; } </style> </head> <body> <div class="background" style="background-color: #FFFF00;"></div> </body> </html></s>
<|user|> Write an HTML page to display a form for user registration. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>User Registration Form</title> </head> <body> <h1>User Registration Form</h1> <form> <input type="text" name="name" placeholder="Enter your name"> <input type="email" name="email" placeholder="Enter your email"> <input type="password" name="password" placeholder="Enter your password"> <input type="submit" value="Submit"> </form> </body> </html></s>
<|user|> Create a HTML page to display information about a group of users. User details: John – Age: 24, Profession: Developer Mark – Age: 26, Profession: Designer</s> <|assistant|> <html> <head> </head> <body> <h1>User Details</h1> <p>John – Age: 24, Profession: Developer</p> <p>Mark – Age: 26, Profession: Designer</p> </body> </html></s>
<|user|> Edit the following XML code to add a navigation bar to the top of a web page <html> <head> <title>My Webpage</title> </head></s> <|assistant|> <html> <head> <title>My Webpage</title> </head> <body> <nav> <ul> <li><a href="index.html">Home</a></li> <li><a href="about.html">About Us</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </body></s>
<|user|> Create a webpage with a two-column layout using HTML. Create two columns with width of 1/3 and 2/3 respectively</s> <|assistant|> <html> <head> <style> .column { float: left; width: 33.33%; padding: 0 10px } </style> </head> <body> <div class="column"> Your content in the first column goes here </div> <div class="column"> Your content in the second column goes here </div> </body> </html></s>
<|user|> Design a HTML page to show a page counter </s> <|assistant|> <html> <head> <title>Page counter</title> <script> var count = 0; function countClick(){ count++ document.getElementById("count").innerHTML = count; } </script> </head> <body> <h1>Page views: <span id="count">0</span></h1> <button onclick="countClick()">Click Me!</button> </body> </html></s>
<|user|> Modify and update the given HTML code to include a background color. <html> <head> <title>My Page</title> </head> <body> <h1>My Page</h1> </body> </html></s> <|assistant|> <html> <head> <title>My Page</title> </head> <body style="background-color: #FFFFFF;"> <h1>My Page</h1> </body> </html></s>
<|user|> Build a HTML page with a section containing two buttons </s> <|assistant|> <html> <head> <title>Button Section</title> </head> <body> <div> <button>First button</button> <button>Second button</button> </div> </body> </html></s>
<|user|> Create a web page to display two input fields to enter the two numbers </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Input fields</title> </head> <body> <h1>Input fields to enter two numbers</h1> <form> <p>Enter the first number:<p> <input type="number" name="number1"><br><br> <p>Enter the second number:</p> <input type="number" name="number2"><br><br> <input type="submit" value="Submit"> </form> </body> </html></s>
<|user|> Create an HTML page to display the output of a JavaScript greeting message. message: Welcome!</s> <|assistant|> <!DOCTYPE html> <html> <head> <title>JavaScript Greeting Message</title> </head> <body> <h1>Welcome!</h1> <script type="text/javascript"> document.write("Welcome!"); </script> </body> </html></s>
<|user|> Fill in the missing characters in the given HTML code <htm__> <head> <tit__>Example</title> </he__></s> <|assistant|> <html> <head> <title>Example</title> </head></s>
<|user|> Create a HTML page to show user data from a REST API. { "name": "John", "age" : 25, "address" : "123 Main Street" }</s> <|assistant|> <html> <head> <title>User Data</title> </head> <body> <h1>User Data</h1> <p>Name: John</p> <p>Age: 25</p> <p>Address: 123 Main Street</p> </body> </html></s>
<|user|> Generate the HTML output for a page that has a title of "Welcome" and a body with a single header of "Hello World!". </s> <|assistant|> <html> <head> <title>Welcome</title> </head> <body> <h1>Hello World!</h1> </body> </html></s>
<|user|> Create a HTML page that contains an unordered list with given items in a given order. list items: " Apple ", " Orange ", " Pineapple"</s> <|assistant|> <html> <head> <title>Fruits List</title> </head> <body> <ul> <li>Apple</li> <li>Orange</li> <li>Pineapple</li> </ul> </body> </html></s>
<|user|> Create a HTML form to allow users to enter an email address and a message. </s> <|assistant|> <!DOCTYPE html> <html> <head> </head> <body> <form action="submit.php" method="post"> Email: <input type="text" name="email"> Message: <input type="text" name="message"> <input type="submit" value="Submit"> </form> </body> </html></s>
<|user|> Create an HTML document to display "Hello, World!" in bold. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Hello World</title> </head> <body> <b>Hello, World!</b> </body> </html></s>
<|user|> Using HTML and CSS, create a simple two-columns landing page. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Two-Column Layout</title> <style> /* define a fixed width for the entire content */ .wrapper{ width: 1000px; margin: 0 auto; } /* define the size and margin of the two columns */ .main-column{ float: left; width: 650px; margin-right: 20px; } .side-column{ float: left; width: 300px; } </style> </head> <body> <div class="wrapper"> <div class="main-column"> <!-- content in main column --> </div> <div class="side-column"> <!-- content in side column --> </div> </div> </body> </html></s>
<|user|> Create a HTML page with 4 divs, one of them should have text aligned in the center. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>4 Divs</title> </head> <body> <div> This div does not contain any special styling </div> <div> This div is colored red <style>div { background-color: red; } </style> </div> <div> This div is colored blue <style>div { background-color: blue; }</style> </div> <div style="text-align: center;"> This div has the text aligned in the center </div> </body> </html></s>
<|user|> Create a HTML page with a textbox, button and a message “Hello World!” </s> <|assistant|> <html> <head></head> <body> <input type="text" id="textbox"> <button onclick="sayHello()">Say Hello</button> <p id="message">Hello World!</p> <script> function sayHello() { var text = document.getElementById('textbox').value; document.getElementById('message').innerHTML = "Hello " + text + "!"; } </script> </body> </html></s>
<|user|> Create a HTML page that prints the following message "Welcome to my website!"</s> <|assistant|> <html> <head> <title>Welcome to my website!</title> </head> <body> <h1>Welcome to my website!</h1> </body> </html></s>
<|user|> Develop a web page which takes user inputs and validates them </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Validate user input</title> <script> function validateInput() { var name = document.getElementById("name").value; var email = document.getElementById("email").value; if (name.length == 0 || email.length == 0) { alert("Please enter your name and email."); return false; } if (!email.includes("@")){ alert("Please enter a valid email address."); return false; } return true; } </script> </head> <body> <h3>Validate user input</h3> <form onsubmit="return validateInput()"> Name: <input type="text" id="name" name="name" /> <br/> Email: <input type="text" id="email" name="email" /> <br/> <input type="submit" value="Submit" /> </form> </body> </html></s>
<|user|> Construct an HTML table that contains the following headers: "Year", "Make", "Model". </s> <|assistant|> <html> <table> <thead> <tr> <th>Year</th> <th>Make</th> <th>Model</th> </tr> </thead> </table> </html></s>
<|user|> Edit this HTML structure to add a footer at the bottom. <html> <head> <title>My Website</title> </head> <body> </body> </html></s> <|assistant|> <html> <head> <title>My Website</title> </head> <body> <footer> <p>Copyright © 20</s>
<|user|> Generate an HTML page with the following data fields: title, author, and content. title: Generating HTML page author: GPT content: This is an example of how you can generate an HTML page.</s> <|assistant|> <html> <head> <title>Generating HTML Page</title> <meta name="author" content="GPT" /> </head> <body> <p>This is an example of how you can generate an HTML page.</p> </body> </html></s>
<|user|> Create an HTML page that uses the CSS box model to style a text. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Text Styling</title> <style> #text { border: solid 1px black; padding: 10px; width: 300px; margin: 10px auto; } </style> </head> <body> <div id="text"> This is some sample text to demonstrate the CSS box model. </div> </body> </html></s>
<|user|> Create a simple website using HTML/CSS. </s> <|assistant|> <html> <head> <title> My Website </title> <style> body { font-family: Arial, Helvetica, sans-serif; } h1 { font-size: 40px; color: blue; } p { font-size: 20px; line-height: 1.6; } </style> </head> <body> <h1> Welcome to my website! </h1> <p> This is a simple website created using HTML and CSS. </p> </body> </html></s>
<|user|> You need to generate an HTML table and style it with CSS. table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; }</s> <|assistant|> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Title of the document</title> </head> <body> <table> <tr> <th>Firstname</th> <th>Lastname</th> <th>Age</th> </tr> <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> </table> </body> </html></s>
<|user|> Create a web page with a simple "Hello World" message. </s> <|assistant|> <html> <head> <title>Hello World</title> </head> <body> <h1>Hello World!</h1> </body> </html></s>
<|user|> Make a HTML5 webpage with a simple form. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Simple Form</title> </head> <body> <form> Name: <input type="text" name="name"/><br><br> Email: <input type="email" name="email"/><br><br> <input type="submit" value="Submit"/> </form> </body> </html></s>
<|user|> Create a HTML page with a form that takes in two numbers as input and adds them together when the form is submitted. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Adding Form</title> </head> <body> <form action="" method="post"> <input type="number" name="a"> <input type="number" name="b"> <input type="submit" value="Submit" /> </form> <script> document.querySelector('form').onsubmit = function(event) { event.preventDefault(); const a = Number(document.querySelector('input[name="a"]').value); const b = Number(document.querySelector('input[name="b"]').value); const result = a + b; alert(`The result of adding ${a} with ${b} is ${result}`); } </script> </body> </html></s>
<|user|> Write an HTML page to display facts about a specific animal. Animal: Cat Name: Fluffy Age: 8 Weight: 10 lbs Fur Color: Orange</s> <|assistant|> <html> <head> <title>Facts about Fluffy</title> </head> <body> <h1>Fluffy the Cat</h1> <ul> <li>Age: 8</li> <li>Weight: 10 lbs</li> <li>Fur Color: Orange</li> </ul> </body> </html></s>
<|user|> Design a web page with the following HTML elements: (1) Heading, (2) Subheading, (3) Form, (4) Button. </s> <|assistant|> <html> <head> <title> My Web Page </title> </head> <body> <h1> Heading </h1> <h2> Subheading </h2> <form> ... </form> <button> Button </button> </body> </html></s>
<|user|> Create a HTML form that takes three inputs and print them out when the submit button is clicked. </s> <|assistant|> <html> <head> <title>Input Form</title> </head> <body> <h1>Input Form</h1> <form action="#"> <p>First name: <input type="text" name="firstname"></p> <p>Last name: <input type="text" name="lastname"></p> <p>Email: <input type="text" name="email"></p> <button type="submit" onclick="printInputs()">Submit</button> </form> <script> function printInputs(){ let firstName = document.querySelector("input[name=firstname]").value; let lastName = document.querySelector("input[name=lastname]").value; let email = document.querySelector("input[name=email]").value; console.log(firstName, lastName, email); } </script> </body> </html></s>
<|user|> Create a HTML page with a drop-down menu with values “green”, “blue” and “red”. </s> <|assistant|> <!DOCTYPE html> <html> <body> <select name="color"> <option value="green">Green</option> <option value="blue">Blue</option> <option value="red">Red</option> </select> </body> </html></s>
<|user|> Update the HTML structure with a <p> tag that contains the text "Welcome to my website". <html> <head> <title>My Website</title> </head> <body> </body> </html></s> <|assistant|> <html> <head> <title>My Website</title> </head> <body> <p>Welcome to my website</p> </body> </html></s>
<|user|> Create a HTML page with a form that takes user input and performs some action when the user clicks the submit button. </s> <|assistant|> <html> <head> <title>Form Demo</title> </head> <body> <form action="form_action.php" method="post"> <label for="username">Username:</label> <input type="text" name="username"> <input type="submit" name="submit" value="Submit"> </form> </body> </html></s>
<|user|> You need to create an HTML page containing a table that contains at least 4 columns and 5 rows. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>HTML Table</title> </head> <body> <table> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th>Column 4</th> </tr> <tr> <td>Row 1</td> <td>Row 1</td> <td>Row 1</td> <td>Row 1</td> </tr> <tr> <td>Row 2</td> <td>Row 2</td> <td>Row 2</td> <td>Row 2</td> </tr> <tr> <td>Row 3</td> <td>Row 3</td> <td>Row 3</td> <td>Row 3</td> </tr> <tr> <td>Row 4</td> <td>Row 4</td> <td>Row 4</td> <td>Row 4</td> </tr> <tr> <td>Row 5</td> <td>Row 5</td> <td>Row 5</td> <td>Row 5</td> </tr> </table> </body> </html></s>
<|user|> Write a HTML page to display a bar chart representing the total sales of a company in different months. Months: Jan, Feb, Mar, Apr, May Total sales in each month: 2500, 4000, 4500, 6000, 5500</s> <|assistant|> <html> <head> <title>Bar Chart Representing Total Sales</title> <script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> <style> canvas{ -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } </style> </head> <body> <div style="width:75%;"> <canvas id="myBarChart"></canvas> </div> <script> var ctx = document.getElementById('myBarChart').getContext('2d'); var myBarChart = new Chart(ctx, { type: 'bar', data: { labels: ["Jan", "Feb", "Mar", "Apr", "May"], datasets: [{ label: "Total sales", data: [2500, 4000, 4500, 6000, 5500], backgroundColor: [ 'rgba(255, 99, 132, 0.2)', 'rgba(54, 162, 235, 0.2)', 'rgba(255, 206, 86, 0.2)', 'rgba(75, 192, 192, 0.2)', 'rgba(153, 102, 255, 0.2)' ], borderColor: [ 'rgba(255, 99, 132, 1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)', 'rgba(153, 102, 255, 1)' ], }] }, options: { scales: { yAxes: [{ ticks: { beginAtZero: true } }] } } }); </script> </body> </html></s>
<|user|> Create an HTML webpage which when opened displays the current date in a paragraph. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Date Page</title> </head> <body> <p> <?php echo "Current date: " . date("d-m-Y"); ?> </p> </body> </html></s>
<|user|> Complete the following HTML template with appropriate tags: <html> <head> </head> <body> </body> </html></s> <|assistant|> <html> <head> <title> Title of page </title> </head> <body> <h1> Header title </h1> <p> This is a sample content of a web page. </p> </body> </html></s>
<|user|> Create an HTML page with a text input box, a submit button and a table to display the results. </s> <|assistant|> <html> <head> <title>Inputs</title> </head> <body> <form> <input type="text" id="inputText"> <input type="submit" value="Submit"> </form> <table> <thead> <tr> <th>Input Text</th> </tr> </thead> <tbody> <tr> <td id="displayValue"></td> </tr> </tbody> </table> </body> </html></s>
<|user|> Create an HTML page to display a heading, a table and a button. headline = “List of Products” table_headers = [“Name”, “Price”, “Quantity”]</s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My Webpage</title> </head> <body> <h1>List of Products</h1> <table> <thead> <tr> <th>Name</th> <th>Price</th> <th>Quantity</th> </tr> </thead> <tbody> <!-- Table Data Here --> </tbody> </table> <button>Submit</button> </body> </html></s>
<|user|> Create an HTML page which displays Hello World in the center of the page. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Hello World</title> <style> body { display: flex; justify-content: center; align-items: center; margin: 0; } </style> </head> <body> <h1>Hello World</h1> </body> </html></s>
<|user|> Create an HTML page that contains two textboxes. The first textbox is for the user to type in their name and the second textbox is for the user to type in their age. </s> <|assistant|> <html> <head> <title>Text Boxes</title> </head> <body> <form> Name: <input type="text" name="name" /> <br><br> Age: <input type="text" name="age" /> <br><br> <input type="submit" value="Submit"> </form> </body> </html></s>
<|user|> Create a web page with a login form that has 2 input fields. </s> <|assistant|> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Login Page</title> </head> <body> <form action="/login" method="post"> <label for="username">Username:</label><br> <input type="text" id="username" name="username" placeholder="Username"><br> <label for="password">Password:</label><br> <input type="password" id="password" name="password" placeholder="Password"><br><br> <input type="submit" value="Submit"> </form> </body> </html></s>
<|user|> Design a web page with a top navigation bar and 2 different color sidebars. </s> <|assistant|> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Web Page</title> <style> body { margin: 0; padding: 0; } .top-nav { position: fixed; background-color: #222; left: 0; top: 0; width: 100%; text-align: center; } .sidebar-left { float: left; width: 25%; height: 100%; background-color: #f1f1f1; } .sidebar-right { float: right; width: 25%; height: 100%; background-color: #ccc; } .main { margin-left: 25%; margin-right: 25%; } </style> </head> <body> <nav class="top-nav"> <ul> <li>{Your navigation items here}</li> </ul> </nav> <div class="sidebar-left"></div> <div class="main"> {Your main content here} </div> <div class="sidebar-right"></div> </body> </html></s>
<|user|> Create an HTML NavBar so that clicking on Home takes the user to a Home page <html> <body> </body> </html></s> <|assistant|> <html> <body> <nav> <ul> <li><a href="index.html">Home</a></li> </ul> </nav> </body> </html></s>
<|user|> Assign a class of 'active' to the last <a> element in the given HTML code. <div> <a href="#">Home</a> <a href="#">About</a> <a href="#">Contact</a> </div></s> <|assistant|> <div> <a href="#">Home</a> <a href="#">About</a> <a href="#" class="active">Contact</a> </div></s>
<|user|> Create a HTML document which show "Hello World!" text with red color in Times New Roman font. </s> <|assistant|> <html> <head> <title>Hello World</title> </head> <body> <p style="color: red; font-family: Times New Roman;">Hello World!</p> </body> </html></s>
<|user|> Create a web page using HTML and CSS to display the current date and time. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Current Date and Time</title> <style> p { font-size: 3em; font-family: Arial, sans-serif; } </style> </head> <body> <p id="time"></p> <script> const today = new Date(); const time = `${today.toLocaleString()}`; document.getElementById("time").innerHTML = time; </script> </body> </html></s>
<|user|> Create an HTML page with a table which contains three rows and three columns. </s> <|assistant|> <html> <head> <title>Table Example</title> </head> <body> <table> <tr> <td>Row 1, Column 1</td> <td>Row 1, Column 2</td> <td>Row 1, Column 3</td> </tr> <tr> <td>Row 2, Column 1</td> <td>Row 2, Column 2</td> <td>Row 2, Column 3</td> </tr> <tr> <td>Row 3, Column 1</td> <td>Row 3, Column 2</td> <td>Row 3, Column 3</td> </tr> </table> </body> </html></s>
<|user|> Create an HTML page with two <div> elements </s> <|assistant|> <html> <body> <div> Content </div> <div> Content </div> </body> </html></s>
<|user|> Create a web page using HTML and CSS where the font size of the content increases with the screen size. </s> <|assistant|> <!DOCTYPE html> <html> <head> <style> h1{ font-size: 1.5em; } @media only screen and (min-width: 600px) { h1 { font-size: 2em; } } @media only screen and (min-width: 900px) { h1 { font-size: 2.5em; } } </style> </head> <body> <h1>My Title</h1> </body> </html></s>
<|user|> Construct an HTML page with a centered text heading. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Centered text heading</title> </head> <body> <h1 align="center">Heading</h1> </body> </html></s>
<|user|> Edit the following HTML code to enable a toggle to show and hide a DIV element when a button is clicked. <div> <button>Toggle</button> <p>This is a text paragraph.</p> </div></s> <|assistant|> <div> <button onclick="toggleFunction()">Toggle</button> <p>This is a text paragraph.</p> <div id="myDIV" style="display:none;"> <p>This is the toggleable content.</p> </div> <script> function toggleFunction() { let x = document.getElementById("myDIV"); if (x.style.display === "none") { x.style.display = "block"; } else { x.style.display = "none"; } } </script> </div></s>
<|user|> Develop a HTML5 program to display a box with the text "Hello World!" </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Hello World!</title> </head> <body> <div class="box">Hello World!</div> </body> </html></s>
<|user|> Create an HTML page with a title and a heading. </s> <|assistant|> <html> <head> <title>My Page</title> </head> <body> <h1>My Page</h1> </body> </html></s>
<|user|> Produce an HTML webpage that shows a table of 10 colors and their corresponding hexcodes. </s> <|assistant|> <html> <head> </head> <body> <table> <thead> <tr> <th>Color</th> <th>Hexcode</th> </tr> </thead> <tbody> <tr> <td>Red</td> <td>#FF0000</td> </tr> <tr> <td>Blue</td> <td>#0000FF</td> </tr> <tr> <td>Green</td> <td>#00FF00</td> </tr> <tr> <td>Yellow</td> <td>#FFFF00</td> </tr> <tr> <td>Orange</td> <td>#FFA500</td> </tr> <tr> <td>Pink</td> <td>#FFC0CB</td> </tr> <tr> <td>Purple</td> <td>#800080</td> </tr> <tr> <td>Cyan</td> <td>#00FFFF</td> </tr> <tr> <td>Brown</td> <td>#A52A2A</td> </tr> <tr> <td>White</td> <td>#FFFFFF</td> </tr> </tbody> </table> </body> </html></s>
<|user|> Build an HTML page to display the current temperature in major cities. </s> <|assistant|> <html> <head> <title>City Temperature Monitor</title> </head> <body> <h1>City Temperature Monitor</h1> <table> <thead> <tr> <th>City</th> <th>Temperature</th> </tr> </thead> <tbody> <tr> <td>London</td> <td><!-- Add code to get London's temperature --></td> </tr> <tr> <td>New York</td> <td><!-- Add code to get New York's temperature --></td> </tr> <tr> <td>Tokyo</td> <td><!-- Add code to get Tokyo's temperature --></td> </tr> </tbody> </table> </body> </html></s>
<|user|> Create a HTML page that contains a table with given data. <html> <head> <title>Data Table</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> <th>Occupation</th> </tr> <tr> <td>John</td> <td>32</td> <td>Engineer</td> </tr> <tr> <td>Max</td> <td>28</td> <td>Doctor</td> </tr> <tr> <td>Jill</td> <td>23</td> <td>Teacher</td> </tr> </table> </body> </html></s> <|assistant|> <html> <head> <title>Data Table</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> <th>Occupation</th> </tr> <tr> <td>John</td> <td>32</td> <td>Engineer</td> </tr> <tr> <td>Max</td> <td>28</td> <td>Doctor</td> </tr> <tr> <td>Jill</td> <td>23</td> <td>Teacher</td> </tr> </table> </body> </html></s>
<|user|> Generate a HTML page with a table </s> <|assistant|> <html> <head> <title>Table</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>John</td> <td>20</td> </tr> <tr> <td>Bob</td> <td>22</td> </tr> </table> </body> </html></s>
<|user|> Modify the following HTML code to add a new div element inside the existing div. <div> Hello, world! </div></s> <|assistant|> <div> <div>New div element</div> Hello, world! </div></s>
<|user|> Construct an HTML page with a navigation bar and two sections. </s> <|assistant|> <html> <head> <title>Navigation Bar Example</title> </head> <body> <ul> <li>Home</li> <li>About</li> <li>Contact</li> </ul> <div> <h1>Home</h1> <p>This is the home page.</p> </div> <div> <h1>About</h1> <p>This is the about page.</p> </div> </body> </html></s>
<|user|> Create a HTML page. </s> <|assistant|> <html> <head> <title>My HTML Page</title> </head> <body> <h1>Hello World!</h1> </body> </html></s>
<|user|> Create an HTML page with a heading, aparagraph and a button that says "Click Here". </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My Website</title> </head> <body> <h1>Welcome to My Website</h1> <p>This is the homepage of My Website.</p> <button type="button">Click Here</button> </body> </html></s>
<|user|> Create a HTML page with two buttons, one to display "Hello World!" and one to display "Goodbye World!" </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Two Buttons</title> </head> <body> <button onclick="alert('Hello World!')">Print Hello World</button> <br /> <button onclick="alert('Goodbye World!')">Print Goodbye World</button> </body> </html></s>
<|user|> Write an HTML program to capture the entered text in an input box </s> <|assistant|> <html> <head> <title>Text Capturing</title> </head> <script> function captureText() { var text = document.getElementById("inputBox").value; alert("Entered text: " + text); } </script> <body> <h1> Text Capturing </h1> <input type="text" id="inputBox" /> <button onclick="captureText()">Capture Text</button> </body> </html></s>
<|user|> Create an HTML page with an input field and a button. The input field should take a sentence and the two button should "Upper Case" and "Lower Case" respectively. When clicked, it should upper case or lower case the sentence in the input field. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>String Case Transformer</title> </head> <body> <input type="text" id="inputStr"> <button onclick="transformCase('upper')">Upper Case</button> <button onclick="transformCase('lower')">Lower Case</button> <script> function transformCase(choice) { var str = document.getElementById("inputStr").value; if (choice === 'upper') { document.getElementById("inputStr").value = str.toUpperCase(); } else { document.getElementById("inputStr").value = str.toLowerCase(); } } </script> </body> </html></s>
<|user|> Generate a web page containing an HTML table containing the numbers from 1 to 10. </s> <|assistant|> <html> <head> <title>Number Table</title> </head> <body> <table> <tr> <th>Number</th> </tr> {% for number in range(1, 11) %} <tr> <td>{{number}}</td> </tr> {% endfor %} </table> </body> </html></s>
<|user|> Codify a static HTML page such that when the page URL is accessed, it displays the message "Please enter your login details". </s> <|assistant|> <html> <head> <title>Login Page</title> </head> <body> <h1>Please enter your login details</h1> </body> </html></s>
<|user|> Design a HTML document to display a chart with the sales of a particular item. </s> <|assistant|> <html> <head> <title>Sales Chart</title> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Month', 'Sales'], ['Jan', 1000], ['Feb', 1170], ['Mar', 660], ['April', 1030] ]); var options = { title: 'Sales of a particular item', legend: 'none', hAxis: {title: 'Month', titleTextStyle: {color: '#333'}}, vAxis: {minValue: 0} }; var chart = new google.visualization.AreaChart(document.getElementById('chart_div')); chart.draw(data, options); } </script> </head> <body> <div id="chart_div" style="width: 900px; height: 500px;"></div> </body> </html></s>
<|user|> Design a web page containing HTML/CSS containing at least 5 containers. </s> <|assistant|> <html> <head> <title>My Webpage</title> </head> <body> <div class="container1" > </div> <div class="container2" > </div> <div class="container3" > </div> <div class="container4" > </div> <div class="container5" > </div> </body> </html></s>
<|user|> Create an HTML webpage that displays a table. </s> <|assistant|> <html> <head> <title>Table Example</title> </head> <body> <table> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> </tr> <tr> <td>Row 1, Column 1</td> <td>Row 1, Column 2</td> <td>Row 1, Column 3</td> </tr> <tr> <td>Row 2, Column 1</td> <td>Row 2, Column 2</td> <td>Row 2, Column 3</td> </tr> </table> </body> </html></s>
<|user|> Create an HTML page that renders two checkboxes and a button using JavaScript. </s> <|assistant|> <html> <head> <script> function renderCheckboxes() { var checkboxes = document.createElement("input"); checkboxes.type = "checkbox"; checkboxes.name = "checkbox"; checkboxes.value = "1"; document.body.appendChild(checkboxes); var checkboxes2 = document.createElement("input"); checkboxes2.type = "checkbox"; checkboxes2.name = "checkbox2"; checkboxes2.value = "2"; document.body.appendChild(checkboxes2); var btn = document.createElement("BUTTON"); btn.innerHTML = "Submit"; document.body.appendChild(btn); } </script> </head> <body onLoad="renderCheckboxes()"> </body> </html></s>
<|user|> Create an HTML page that contains an input field and a submit button; when the button is clicked, it should print the input text in the HTML page. </s> <|assistant|> <html> <head> <script> function printInput() { let input = document.getElementById("input").value; document.getElementById("result").innerHTML = input; } </script> </head> <body> <input type="text" id="input" /> <button type="submit" onclick="printInput()">submit</button> <div id="result"></div> </body> </html></s>
<|user|> Construct a HTML page that takes a user input and display the response. </s> <|assistant|> <html> <body> <form action="" method="POST"> Enter your name: <input type="text" name="name"><br> <input type="submit" value="Submit"> </form> <?php if (isset($_POST['name'])) { echo "Hello, " . $_POST['name']; } ?> </body> </html></s>
<|user|> Edit the following HTML string so that it sets the background color of the page to "blue". <html> <body> </body> </html></s> <|assistant|> <html> <body style="background-color: blue;"> </body> </html></s>
<|user|> Create a HTML page to display a table with 5 rows and 4 columns of data. </s> <|assistant|> <html> <head> <title>Table Example</title> </head> <body> <table> <tr> <td>Row 1, Column 1</td> <td>Row 1, Column 2</td> <td>Row 1, Column 3</td> <td>Row 1, Column 4</td> </tr> <tr> <td>Row 2, Column 1</td> <td>Row 2, Column 2</td> <td>Row 2, Column 3</td> <td>Row 2, Column 4</td> </tr> <tr> <td>Row 3, Column 1</td> <td>Row 3, Column 2</td> <td>Row 3, Column 3</td> <td>Row 3, Column 4</td> </tr> <tr> <td>Row 4, Column 1</td> <td>Row 4, Column 2</td> <td>Row 4, Column 3</td> <td>Row 4, Column 4</td> </tr> <tr> <td>Row 5, Column 1</td> <td>Row 5, Column 2</td> <td>Row 5, Column 3</td> <td>Row 5, Column 4</td> </tr> </table> </body> </html></s>
<|user|> Create an HTML page that displays a table with three columns: Name, Age, and Gender. </s> <|assistant|> <html> <head> <title>Table Examples</title> </head> <body> <table> <caption>People Table</caption> <tr> <th>Name</th> <th>Age</th> <th>Gender</th> </tr> <tr> <td>John</td> <td>30</td> <td>Male</td> </tr> <tr> <td>Jane</td> <td>20</td> <td>Female</td> </tr> </table> </body> </html></s>
<|user|> Correct the following HTML code and check the output in a browser. <html> <heade> <title>Test Page</title> </heade> <body> <p>This is a test.</p> </body> </html></s> <|assistant|> <html> <head> <title>Test Page</title> </head> <body> <p>This is a test.</p> </body> </html></s>
<|user|> Create an HTML page that uses Bootstrap to create a responsive navigation bar. </s> <|assistant|> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> </head> <body> <nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <a class="navbar-brand" href="#">My Website</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav mr-auto"> <li class="nav-item active"> <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> </li> <li class="nav-item"> <a class="nav-link" href="#">About</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Contact</a> </li> </ul> </div> </nav> </body> </html></s>
<|user|> Write an HTML page with an input form having two text input fields </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My page</title> </head> <body> <form> <input type="text" name="name" placeholder="Name"> <input type="text" name="email" placeholder="Email"> <input type="submit" value="Submit"> </form> </body> </html></s>
<|user|> Generate a short HTML div element. </s> <|assistant|> <div></div></s>
<|user|> Write an HTML document with a table containing three columns: name, email and phone. </s> <|assistant|> <html> <head> <title>Contacts Table</title></title> </head> <body> <table> <thead> <th>Name</th> <th>Email</th> <th>Phone</th> </thead> <tbody> <tr> <td>John</td> <td>[email protected]</td> <td>123-456-7890</td> </tr> </tbody> </table> </body> </html></s>
<|user|> Create a program in HTML to display the following two paragraphs side by side. P1: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. P2: Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</s> <|assistant|> <html> <head> <title>Side by Side Paragraphs</title> <style> .column { float: left; width: 50%; } /* Clear floats after the columns */ .row:after { content: ""; display: table; clear: both; } </style> </head> <body> <div class="row"> <div class="column"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </div> <div class="column"> <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> </div> </div> </body> </html></s>
<|user|> Create a new HTML page and add a heading to it. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My HTML Page</title> </head> <body> <h1>My Page Heading</h1> </body> </html></s>
<|user|> Create an HTML page containing a form labeled "Contact Us" containing 3 input fields named: name, email, and message. </s> <|assistant|> <html> <head> <title>Contact Us</title> </head> <body> <h1>Contact Us</h1> <form> Name: <input type="text" name="name"/><br /> Email: <input type="text" name="email"/><br /> Message: <input type="text" name="message"/><br /> <input type="submit" value="Submit" /> </form> </body> </html></s>
<|user|> Write an HTML page containing an <input> element with the name "username". </s> <|assistant|> <html> <head> </head> <body> <input type="text" name="username"/> </body> </html></s>
<|user|> Write HTML code to set the font size of a page to 18px. </s> <|assistant|> <html> <head> <style> body { font-size: 18px; } </style> </head> </html></s>
<|user|> Create a HTML page with a table which contains data about the student population. </s> <|assistant|> <html> <body> <table> <tr> <th>Student Name</th> <th>Class</th> <th>Age</th> </tr> <tr> <td>John</td> <td>8th</td> <td>14</td> </tr> <tr> <td>Ann</td> <td>9th</td> <td>15</td> </tr> <tr> <td>James</td> <td>10th</td> <td>16</td> </tr> </table> </body> </html></s>
<|user|> Create a HTML page displaying a table holding information about the 10 most populous countries in the world. </s> <|assistant|> <html> <head> <title>Population of the World</title> </head> <body> <table> <tr> <th>Country</th> <th>Population</th> </tr> <tr> <td>China</td <td>1,439,323,776</td> </tr> <tr> <td>India</td> <td>1,380,004,385</td> </tr> <tr> <td>United States</td> <td>329,064,917</td> </tr> <tr> <td>Indonesia</td> <td>273,523,615</td> </tr> <tr> <td>Pakistan</td> <td>220,892,340</td> </tr> <tr> <td>Brazil</td> <td>212,559,717</td> </tr> <tr> <td>Nigeria</td> <td>206,139,589</td> </tr> <tr> <td>Bangladesh</td> <td>164,689,383</td> </tr> <tr> <td>Russia</td> <td>145,934,462</td> </tr> <tr> <td>Mexico</td> <td>126,577,691</td> </tr> </table> </body> </html></s>
<|user|> Use HTML to create a webpage which featured a table. </s> <|assistant|> <html> <head> <title>Page Title</title> </head> <body> <h1>My Table Webpage</h1> <table> <tr> <th>Column 1</th> <th>Column 2</th> </tr> <tr> <td>Row 1, Column 1</td> <td>Row 1, Column 2</td> </tr> <tr> <td>Row 2, Column 1</td> <td>Row 2, Column 2</td> </tr> <tr> <td>Row 3, Column 1</td> <td>Row 3, Column 2</td> </tr> </table> </body> </html></s>
<|user|> Create a basic UI in HTML/CSS for a shopping cart website. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Shopping Cart</title> <style> body { margin: 0px; } #container { width: 100%; height: 100%; display: flex; flex-direction: column; } #header { height: 100px; background-color: #eee; display: flex; align-items: center; justify-content: center; } #content { flex: 1; background-color: #ccc; } #footer { height: 100px; background-color: #eee; display: flex; align-items: center; justify-content: center; } </style> </head> <body> <div id="container"> <div id="header"> <h1>Shopping Cart</h1> </div> <div id="content"> <!-- Content here --> </div> <div id="footer"> &copy; All rights reserved </div> </div> </body> </html></s>
<|user|> Use CSS to style an HTML table with a heading and 6 rows and 4 columns. </s> <|assistant|> <html> <head> <style> table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #f2f2f2; } </style> </head> <body> <table> <tr> <th>Heading1</th> <th>Heading2</th> <th>Heading3</th> <th>Heading4</th> </tr> <tr> <td>row1_col1</td> <td>row1_col2</td> <td>row1_col3</td> <td>row1_col4</td> </tr> <tr> <td>row2_col1</td> <td>row2_col2</td> <td>row2_col3</td> <td>row2_col4</td> </tr> <tr> <td>row3_col1</td> <td>row3_col2</td> <td>row3_col3</td> <td>row3_col4</td> </tr> <tr> <td>row4_col1</td> <td>row4_col2</td> <td>row4_col3</td> <td>row4_col4</td> </tr> <tr> <td>row5_col1</td> <td>row5_col2</td> <td>row5_col3</td> <td>row5_col4</td> </tr> <tr> <td>row6_col1</td> <td>row6_col2</td> <td>row6_col3</td> <td>row6_col4</td> </tr> </table> </body> </html></s>
<|user|> Edit this HTML code to only display the title. <html> <head> <title>HTML Document</title> </head> <body> <h1>Hello World!</h1> </body> </html></s> <|assistant|> <html> <head> <title>HTML Document</title> </head> </html></s>
<|user|> Edit the provided HTML structure to add an ordered list inside the body with 3 list items. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My Webpage</title> </head> <body> </body> </html></s> <|assistant|> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My Webpage</title> </head> <body> <ol> <li>List Item 1</li> <li>List Item 2</li> <li>List Item 3</li> </ol> </body> </html></s>
<|user|> Build a HTML page with the provided structure. <html> <head> </head> <body> </body> </html></s> <|assistant|> <html> <head> <title>Page Title</title> </head> <body> <h1>Welcome to my page</h1> <p>This is a simple page example built with HTML and CSS.</p> </body> </html></s>
<|user|> Edit the following HTML to link the page with a stylesheet <!DOCTYPE html> <html> <head> <title>My Page</title> </head> <body> </body> </html></s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My Page</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> </body> </html></s>
<|user|> Write a HTML code for a webpage that displays the headline "Hello World!". </s> <|assistant|> <html> <head> <title>Hello World</title> </head> <body> <h1>Hello World!</h1> </body> </html></s>