text
stringlengths
79
2.28k
<|user|> Write an HTML page with a header that displays your name. </s> <|assistant|> <html> <head> <title>My webpage</title> </head> <body> <h1>My name is John Smith</h1> </body> </html></s>
<|user|> Update the following HTML page so it displays a simple form. <!DOCTYPE html> <html> <head> <title>My Form</title> </head> <body> <!-- Your code goes here! --> </body> </html></s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My Form</title> </head> <body> <form action="#"> <label for="name">Name:</label> <input type="text" name="name"> <label for="email">Email:</label> <input type="text" name="email"> <button>Submit</button> </form> </body> </html></s>
<|user|> Edit the existing code to focus the cursor in the input field. <html> <body> <input type="text" id="myInput" /> <script type="text/javascript"> document.getElementById('myInput').focus(); </script> </body> </html></s> <|assistant|> <html> <body> <input type="text" id="myInput" autofocus /> <script type="text/javascript"> document.getElementById('myInput').focus(); </script> </body> </html></s>
<|user|> Compose a basic HTML page to display the phrase "Contact us now!" </s> <|assistant|> <html> <head> <title>Contact Page</title> </head> <body> <h1>Contact Us Now!</h1> </body> </html></s>
<|user|> Write an HTML page with a form having two textboxes and two buttons. </s> <|assistant|> <html> <body> <form> <input type="text" id="textbox1" /><br> <input type="text" id="textbox2" /><br> <button name="submitbtn">Submit</button><br> <button name="resetbtn">Reset</button><br> </form> </body> </html></s>
<|user|> Create an HTML template for a login form having username and password. </s> <|assistant|> <html> <head> <title>Login Form</title> </head> <body> <form action="" method="POST"> <label>Username:</label><input type="text" /> <label>Password:</label><input type="password" /> <input type="submit" /> </form> </body> </html></s>
<|user|> Create an HTML page with a table containing the following data in four rows. Id | First Name | Last Name | Age 1 | John | Doe | 30 2 | Jane | Doe | 25 3 | Brian | Smith | 32 4 | Maria | Smith | 28</s> <|assistant|> <html> <head> <title>Table Data</title> </head> <body> <table> <thead> <tr> <th>Id</th> <th>First Name</th> <th>Last Name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>John</td> <td>Doe</td> <td>30</td> </tr> <tr> <td>2</td> <td>Jane</td> <td>Doe</td> <td>25</td> </tr> <tr> <td>3</td> <td>Brian</td> <td>Smith</td> <td>32</td> </tr> <tr> <td>4</td> <td>Maria</td> <td>Smith</td> <td>28</td> </tr> </tbody> </table> </body> </html></s>
<|user|> Write an HTML page with two headings "Home" and "About". </s> <|assistant|> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Title</title> </head> <body> <h1>Home</h1> <h1>About</h1> </body> </html></s>
<|user|> Develop an HTML page with a div and table, and use CSS to make alternating rows of the table red and blue. </s> <|assistant|> <html> <head> <style> table tr:nth-child(2n) { background-color: red; } table tr:nth-child(2n+1) { background-color: blue; } </style> </head> <body> <div> <table> <tr> <th>Cell 1</th> <th>Cell 2</th> <th>Cell 3</th> </tr> <tr> <td>Data 1</td> <td>Data 2</td> <td>Data 3</td> </tr> <tr> <td>Data 4</td> <td>Data 5</td> <td>Data 6</td> </tr> </table> </div> </body> </html></s>
<|user|> Generate a dynamic HTML table displaying 10 random numbers from 1 to 100. </s> <|assistant|> <html> <head> </head> <body> <div> <table> <tr><th>Random Numbers</th></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> <tr><td><?php echo rand(1,100); ?></td></tr> </table> </div> </body> </html></s>
<|user|> Develop an HTML form which includes two input fields, an label and a submit button. </s> <|assistant|> <html> <head> </head> <body> <form> <label>Name: </label><input type="text" name="name"><br> <label>Age: </label><input type="text" name="age"><br> <input type="submit" value="Submit"> </form> </body> </html></s>
<|user|> Develop an HTML page with three sections, each containing different colors. </s> <|assistant|> <html> <head> <style> #section1 { background-color: red; } #section2 { background-color: blue; } #section3 { background-color: yellow; } </style> </head> <body> <div id="section1"></div> <div id="section2"></div> <div id="section3"></div> </body> </html></s>
<|user|> Construct a set of HTML tags to design a simple two-column layout. </s> <|assistant|> <html> <head> <title>Two-column layout</title> </head> <body> <div class="container"> <div class="column-left"> <!--Your content here--> </div> <div class="column-right"> <!--Your content here--> </div> </div> </body> </html></s>
<|user|> Write some HTML code that adds a background color to the complete web page. </s> <|assistant|> <html> <head> <style> body {background-color: #F0F0F0;}</style> </head> </html></s>
<|user|> Create a website that displays the current day's weather forecast in Philadelphia. </s> <|assistant|> <html> <head> <title>Weather App</title> </head> <body> <h1>Weather in Philadelphia</h1> <h2>Today</h2> <div id="weather"> <script> // API call to get the weather forecast fetch("https://api.weather.gov/gridpoints/PHI/20,34/forecast") .then(response => response.json()) .then(data => { // store data in variables let tempHigh = data.properties.periods[0].temperature let tempLow = data.properties.periods[0].temperatureTrend let weatherDescription = data.properties.periods[0].shortForecast let windSpeedInMPH = data.properties.periods[0].windSpeed let windDirection = data.properties.periods[0].windDirection // create HTML string for displaying the forecast let forecastHTML = ` <p><strong>Today's High:</strong> ${tempHigh}&deg;F</p> <p><strong>Today's Low:</strong> ${tempLow}&deg;F</p> <p><strong>Description:</strong> ${weatherDescription}</p> <p><strong>Wind Speed:</strong> ${windSpeedInMPH} MPH, ${windDirection}</p> ` // display forecast on the page document.getElementById('weather').innerHTML = forecastHTML; }); </script> </div> </body> </html></s>
<|user|> Create a HTML page which displays the result of multiplying two user-provided numbers. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Multiply</title> </head> <body> <h1>Multiplication Result</h1> <form action="" method="POST"> Enter the first number: <input type="text" name="num1"><br> Enter the second number: <input type="text" name="num2"><br> <input type="submit" value="Submit"> </form> <p> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { $num1=$_POST['num1']; $num2=$_POST['num2']; echo "Result: ".$num1*$num2; } ?> </p> </body> </html></s>
<|user|> Write a short HTML page to display a welcome message. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Welcome</title> </head> <body> <h1>Welcome!</h1> </body> </html></s>
<|user|> Generate a valid HTML page with the following styles and content background color: yellow; padding: 10px; Content: "Hello World!"</s> <|assistant|> <html> <head> <title>Hello World!</title> <style> body { background-color: yellow; padding: 10px; } </style> </head> <body> <p>Hello World!</p> </body> </html></s>
<|user|> Edit this HTML code to add the Google Font “Roboto”. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My First Web Page</title> </head> <body> </body> </html></s> <|assistant|> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet"> <title>My First Web Page</title> <style> body { font-family: 'Roboto', sans-serif; } </style> </head> <body> </body> </html></s>
<|user|> Create an HTML page that displays two columns consisting of the numbers 1 to 10. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Two columns of numbers from 1 to 10</title> </head> <body> <h1>Two columns of numbers from 1 to 10</h1> <table> <tr> <th>Column 1</th> <th>Column 2</th> </tr> <tr> <td>1</td> <td>6</td> </tr> <tr> <td>2</td> <td>7</td> </tr> <tr> <td>3</td> <td>8</td> </tr> <tr> <td>4</td> <td>9</td> </tr> <tr> <td>5</td> <td>10</td> </tr> </table> </body> </html></s>
<|user|> Design a HTML page with a header and 2 sections </s> <|assistant|> <html> <head> <title>MyPage</title> </head> <body> <header> <h1>Welcome to My Page</h1> </header> <section> Content in Section 1 </section> <section> Content in Section 2 </section> </body> </html></s>
<|user|> Create a HTML page to display a table in the following format. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Table</title> </head> <body> <table> <tr> <th>Name</th> <th>Address</th> <th>Phone</th> </tr> <tr> <td>John</td> <td>123 Fake Street</td> <td>123-456-7890</td> </tr> <tr> <td>Jane</td> <td>456 Real Street</td> <td>098-765-4321</td> </tr> </table> </body> </html></s>
<|user|> Create a HTML page containing an input field, a submit button and a table for displaying the results. </s> <|assistant|> <html> <head> <title>A Sample HTML Page</title> </head> <body> <form> <input type="text" id="input-field" /> <input type="submit" value="Submit" /> </form> <table> <tr> <th>Results</th> </tr> <tbody id="results-table"> </tbody> </table> </body> </html></s>
<|user|> Generate a web page which shows the top 10 trending movies of the year. </s> <|assistant|> <html> <head> <title>Top 10 Trending Movies of the Year</title> </head> <body> <h1>Top 10 Trending Movies of the Year</h1> <ul> <li>Avengers: Endgame</li> <li>Captain Marvel</li> <li>Spider-Man: Far From Home</li> <li>Toy Story 4</li> <li>Joker</li> <li>Aladdin</li> <li>John Wick 3</li> <li>The Lion King</li> <li>Rocketman</li> <li>Once Upon a Time in Hollywood</li> </ul> </body> </html></s>
<|user|> Generate an HTML page with a table containing all the elements of an array in JavaScript. [1, 2, 3, 4]</s> <|assistant|> <html> <head> <title>Array Table</title> </head> <body> <table> <tr> <th>Element Value</th> </tr> <tr> <td>1</td> </tr> <tr> <td>2</td> </tr> <tr> <td>3</td> </tr> <tr> <td>4</td> </tr> </table> </body> </html></s>
<|user|> Create a HTML page with given header and footer elements. Header: <h1>Hi there!</h1> Footer: <h5>Goodbye!</h5></s> <|assistant|> <html> <head> <title>Page Title</title> </head> <body> <h1>Hi there!</h1> <div> // Page content goes here </div> <h5>Goodbye!</h5> </body> </html></s>
<|user|> Create a web page that has a button to toggle a navigation bar. </s> <|assistant|> <html> <head> <title>Menu toggle example</title> </head> <body> <h1>Toggle Menu</h1> <div id="menu-container"> <a href="link1.html">Link 1</a> <a href="link2.html">Link 2</a> <a href="link3.html">Link 3</a> </div> <button id="toggle-menu">Toggle Menu</button> <script> let toggleButton = document.getElementById('toggle-menu'); let menuContainer = document.getElementById('menu-container'); toggleButton.onclick = function(){ if (menuContainer.style.display == 'none'){ menuContainer.style.display = 'block'; } else { menuContainer.style.display = 'none'; } } </script> </body> </html></s>
<|user|> Create a web page to display all the weekdays </s> <|assistant|> <html> <head> <title>Weekdays</title> </head> <body> <h1>Weekdays</h1> <ul> <li>Monday</li> <li>Tuesday</li> <li>Wednesday</li> <li>Thursday</li> <li>Friday</li> <li>Saturday</li> <li>Sunday</li> </ul> </body> </html></s>
<|user|> Write an HTML page which displays the current time and date. </s> <|assistant|> <html> <body> <p>Today is <span id="date"> </span> and the time is <span id="time"> </span>.</p> <script> let d = new Date(); let date = d.toDateString(); document.getElementById("date").innerHTML = date; let time = d.toLocaleTimeString(); document.getElementById("time").innerHTML = time; </script> </body> </html></s>
<|user|> Draft an HTML page with a table that contains three columns and two rows. </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 Data 1</td> <td>Row 1 Data 2</td> <td>Row 1 Data 3</td> </tr> <tr> <td>Row 2 Data 1</td> <td>Row 2 Data 2</td> <td>Row 2 Data 3</td> </tr> </table> </body> </html></s>
<|user|> Create an HTML page demonstrating the application of "for" loop in JavaScript </s> <|assistant|> <html> <head> <script> for(let i=0; i<5; i++){ console.log('loop ' + i); } </script> </head> <body> </body> </html></s>
<|user|> Generate a HTML table to display the following data. Row1: Name: Harry Age: 18 Row2: Name: Jane Age: 20</s> <|assistant|> <html> <head> <title>Data Table</title> </head> <body> <h1>Data Table</h1> <table> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>Harry</td> <td>18</td> </tr> <tr> <td>Jane</td> <td>20</td> </tr> </table> </body> </html></s>
<|user|> Create a HTML page displaying 3 columns of data Data: ["Name", "Age", "Gender"], ["Bob", 35, "Male"], ["John", 28, "Male"], ["Sarah", 39, "Female"]</s> <|assistant|> <html> <head> <title>Data</title> </head> <body> <table> <thead> <th>Name</th> <th>Age</th> <th>Gender</th> </thead> <tbody> <tr> <td>Bob</td> <td>35</td> <td>Male</td> </tr> <tr> <td>John</td> <td>28</td> <td>Male</td> </tr> <tr> <td>Sarah</td> <td>39</td> <td>Female</td> </tr> </tbody> </table> </body> </html></s>
<|user|> Create a HTML page containing a form with three input boxes. </s> <|assistant|> <html> <body> <form> <input type="text" name="box1" /> <input type="text" name="box2" /> <input type="text" name="box3" /> </form> </body> </html></s>
<|user|> Create an HTML page of a multi-step registration form. Step 1: Name and Email Step 2: Address Step 3: Password</s> <|assistant|> <html> <head> <title>Registration Form</title> <style> body { font-family: sans-serif; } .container { width: 500px; margin: 0 auto; } .form-steps { padding: 20px 0; } .form-step { padding: 10px; border: 1px solid #ccc; background-color: #eee; } .active { background-color: #cdeb8e; } button { background-color: #3f51b5; color: #fff; padding: 8px 15px; border: 0; margin-top: 20px; } </style> </head> <body> <div class="container"> <div class="form-steps"> <div class="form-step active"><p>Step 1: Name and Email</p></div> <div class="form-step"><p>Step 2: Address</p></div> <div class="form-step"><p>Step 3: Password</p></div> </div> <form> <input type="text" placeholder="Name" /> <input type="text" placeholder="Email" /> <input type="text" placeholder="Address" /> <input type="password" placeholder="Password" /> <button>Submit</button> </form> </div> </body> </html></s>
<|user|> Write an HTML document with a heading, a paragraph and a link to www.example.com. </s> <|assistant|> <html> <head> <title>Example HTML</title> </head> <body> <h1>Heading</h1> <p>This is a paragraph.</p> <a href="www.example.com">Link to example.com</a> </body> </html></s>
<|user|> Write a HTML web page with a heading, paragraph, and a form with two input fields, one for name and one for age. </s> <|assistant|> <html> <head> <title>Example HTML</title> </head> <body> <h1>Heading</h1> <p>This is a paragraph.</p> <form> Name: <input type="text" name="name" /> Age: <input type="number" name="age" /> <input type="submit" /> </form> </body> </html></s>
<|user|> Create a HTML page with a header containing the text "My page" and an empty body section. </s> <|assistant|> <html> <head> <title>My page</title> </head> <body> </body> </html></s>
<|user|> Create an HTML page that displays the name, address, email and phone number of a given user. Name: John Doe Address: 123 Main Street Email: [email protected] Phone: 987654321</s> <|assistant|> <html> <head> <title>John Doe's information</title> </head> <body> <h1>John Doe</h1> <p> Address: 123 Main Street <br> Email: [email protected] <br> Phone: 987654321 </p> </body> </html></s>
<|user|> Create a web page to display a result of a dictionary containing all countries in the world and its corresponding capital in three columns. </s> <|assistant|> <html> <head> <title>Countries and Capitols</title> </head> <body style="background-color: #f9f9f9; font-family: sans-serif; padding: 50px"> <h1 style="text-align:center; color: #444444;">World Countries and Capitols</h1> <p>Below is a list of countries and capitols, presented in three columns: country, capital and continent.</p> <table style="width:100%;border: 1px solid #444444; text-align: center; margin:20px auto;"> <tr> <th style="background-color:#444444; color: #ffffff">Country</th> <th style="background-color:#444444; color: #ffffff">Capital</th> <th style="background-color:#444444; color: #ffffff">Continent</th> </tr> <tr> <td>Australia</td> <td>Canberra</td> <td>Oceania</td> </tr> <tr> <td>Brazil</td> <td>Brasilia</td> <td>South America</td> </tr> <tr> <td>China</td> <td>Beijing</td> <td>Asia</td> </tr> <tr> <td>USA</td> <td>Washington D.C.</td> <td>North America</td> </tr> </table> </body> </html></s>
<|user|> Write an HTML page from scratch to display a user's contact information. name: John Doe; age: 46; phone: +1 (312) 555-4879; email: [email protected];</s> <|assistant|> <!DOCTYPE html> <html> <head> <title>John Doe's Contact Information</title> </head> <body> <h2>John Doe</h2> <p>Age: 46</p> <p>Phone: +1 (312) 555-4879</p> <p>Email: [email protected]</p> </body> </html></s>
<|user|> Create a web page with a header and a paragraph, both with some text. </s> <|assistant|> <html> <head> <title>My Web Page</title> </head> <body> <h1>My Web Page</h1> <p>This is my web page. It has a header and a paragraph.</p> </body> </html></s>
<|user|> Construct a HTML page which displays a table with all words of a given string. string = "Hello World"</s> <|assistant|> <html> <head> <title>Table of Words</title> </head> <body> <table border="1"> <tr> <th>Word</th> </tr> <tr> <td>Hello</td> </tr> <tr> <td>World</td> </tr> </table> </body> </html></s>
<|user|> Write an HTML page that displays the text "My favorite color is blue" in a blue font. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My Favorite Color</title> </head> <body> <h1 style="color: blue;">My favorite color is blue</h1> </body> </html></s>
<|user|> Write an HTML code to display a webpage with a centered paragraph. </s> <|assistant|> <html> <head> <title>Centered Paragraph</title> </head> <body> <div style="text-align:center;"> <p>This is a centered paragraph.</p> </div> </body> </html></s>
<|user|> Create a new HTML page and add a <div> element inside the <body>. </s> <|assistant|> <html> <head> <title>New Page</title> </head> <body> <div></div> </body> </html></s>
<|user|> Create a web page to display the current weather in your city. The weather data should be in the form of temperature, humidity, wind speed, and barometric pressure.</s> <|assistant|> <html> <head> <title>Current Weather</title> </head> <body> <p>Temperature: <span id="temperature"></span></p> <p>Humidity: <span id="humidity"></span></p> <p>Wind Speed: <span id="wind_speed"></span></p> <p>Barometric Pressure: <span id="pressure"></span></p> <script> // Weather data from API const api_url = 'api_url'; fetch(api_url) .then(response => response.json()) .then(data => { document.getElementById('temperature').innerHTML = data.temperature; document.getElementById('humidity').innerHTML = data.humidity; document.getElementById('wind_speed').innerHTML = data.windSpeed; document.getElementById('pressure').innerHTML = data.pressure; }); </script> </body> </html></s>
<|user|> Design an HTML form to register users on a website. </s> <|assistant|> <html> <head> <title>User Registration Form</title> </head> <body> <h1>Register a new user</h1> <form action="register.php" method="POST"> <label>First Name:</label><br> <input type="text" name="firstName" required><br><br> <label>Last Name:</label><br> <input type="text" name="lastName" required><br><br> <label>Email:</label><br> <input type="text" name="email" required><br><br> <label>Password:</label><br> <input type="password" name="password" required><br><br> <input type="submit" value="Register"> </form> </body> </html></s>
<|user|> Create a HTML page which displays "Hello, World!" on the screen. </s> <|assistant|> <html> <head> <title>Hello, World!</title> </head> <body> <h1>Hello, World!</h1> </body> </html></s>
<|user|> Add AJAX functionalities to the following HTML document. <!DOCTYPE html> <html> <head> <title>AJAX Example</title> </head> <body> </body> </html></s> <|assistant|> <!DOCTYPE html> <html> <head> <title>AJAX Example</title> <script> function loadData(){ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("data").innerHTML = this.responseText; } }; xhttp.open("GET", "data.txt", true); xhttp.send(); } </script> </head> <body> <h2>AJAX Example</h2> <div id="data">AJAX will place the data here</div> <button type="button" onclick="loadData()">Load data</button> </body> </html></s>
<|user|> Create an HTML page with an <h1> heading "Welcome!" and a <p> paragraph with the text "I am happy to be here." </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Welcome!</title> </head> <body> <h1>Welcome!</h1> <p>I am happy to be here.</p> </body> </html></s>
<|user|> Change the following HTML page to an Angular web page. <html> <head> <title>TITLE</title> </head> <body> <h1>HEADER</h1> <p>Paragraph</p> </body> </html></s> <|assistant|> <!DOCTYPE html> <html> <head> <title>TITLE</title> <script src="https://unpkg.com/@angular/[email protected]/bundles/core.umd.js"></script> <script src="https://unpkg.com/@angular/[email protected]/bundles/common.umd.js"></script> <script src="https://unpkg.com/@angular/[email protected]/bundles/platform-browser.umd.js"></script> <script src="https://unpkg.com/@angular/[email protected]/bundles/platform-browser-dynamic.umd.js"></script> </head> <body> <h1>HEADER</h1> <app-root>Paragraph</app-root> <script> //This will handle the rendering of the Angular app platformBrowserDynamic().bootstrapModule(AppModule); </script> </body> </html></s>
<|user|> Create a HTML page to show a list of employees, their departments and corresponding salary ranges. John Doe - Sales - 35000 - 50000 Jane Doe - Marketing - 40000 - 65000</s> <|assistant|> <html> <head> <title>Employees</title> </head> <body> <h1>Employees</h1> <ul> <li>John Doe - Sales - 35000 - 50000</li> <li>Jane Doe - Marketing - 40000 - 65000</li> </ul> </body> </html></s>
<|user|> Create an HTML page with a header containing the text "Welcome to our website". </s> <|assistant|> <html> <head><title>Welcome to our website</title></head> <body> <h1>Welcome to our website</h1> </body> </html></s>
<|user|> Generate a HTML code which has a black background and white font. </s> <|assistant|> <!DOCTYPE html> <html> <head> <style> body { background-color: black; color: white; } </style> </head> <body> </body> </html></s>
<|user|> Construct a HTML page that displays a form with a text field and a submit button. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Sample Form</title> </head> <body> <form action="" method="post"> <input type="text" placeholder="Input..."/> <input type="submit" value="Submit" /> </form> </body> </html></s>
<|user|> Edit this HTML page to make the page have a centered heading <html> <head> <title>Sample Page</title> </head> <body> <h1>Heading</h1> </body> </html></s> <|assistant|> <html> <head> <title>Sample Page</title> </head> <body> <h1 style="text-align: center;">Heading</h1> </body> </html></s>
<|user|> Create an HTML page with a blurred background and centered text "Hello World". </s> <|assistant|> <html> <head> <style> body { background-image: url("background.jpg"); background-size: cover; background-blur: 10px; } .container { position: relative; text-align: center; } </style> </head> <body> <div class="container"> <h1>Hello World</h1> </div> </body> </html></s>
<|user|> Create a HTML page that displays the current time. </s> <|assistant|> <html> <head> <title>Time Display</title> <script> function updateTime() { let currTime = new Date(); document.getElementById("currentTime").innerHTML = currTime.toLocaleTimeString(); } </script> </head> <body onload="updateTime()"> <div id="currentTime"></div> </body> </html></s>
<|user|> Use HTML and CSS to format a page with three columns, two of which contain two paragraphs each and the last containing a list of 10 items. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>3 Column Layout</title> <style> body { width: 1000px; margin: 0 auto; } .column-left { float: left; width: 33%; } .column-center { float: left; width: 33%; } .column-right { float: left; width: 33%; } </style> </head> <body> <div class="column-left"> <p>Paragraph 1</p> <p>Paragraph 2</p> </div> <div class="column-center"> <p>Paragraph 3</p> <p>Paragraph 4</p> </div> <div class="column-right"> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> <li>Item 6</li> <li>Item 7</li> <li>Item 8</li> <li>Item 9</li> <li>Item 10</li> </ul> </div> </body> </html></s>
<|user|> Generate a HTML document with 3 divs, each div being 50px wide and 100px tall </s> <|assistant|> <html> <head> <title>HTML Div Test</title> </head> <body> <div style="width:50px; height:100px;">Div 1</div> <div style="width:50px; height:100px;">Div 2</div> <div style="width:50px; height:100px;">Div 3</div> </body> </html></s>
<|user|> Using jQuery, update the HTML code to provide the user a toggle switch that changes the text from "off" to "on" when clicked. <div> <p>Status: <span class='status'>off</span></p> </div></s> <|assistant|> <div> <p>Status: <span class='status'>off</span> <button onclick="toggleStatus()">Toggle</button> </p> <script> function toggleStatus() { $('.status').text($('.status').text() === 'off' ? 'on' : 'off'); } </script> </div></s>
<|user|> Create an HTML page with a form containing a checkbox. </s> <|assistant|> <html> <body> <form> <input type="checkbox" /> </form> </body> </html></s>
<|user|> Using HTML and CSS, create a page layout with two columns and a header row. </s> <|assistant|> <html> <head> <style> .table { display: table; width: 100%; } .table-row { display: table-row; } .table-cell { display: table-cell; } </style> </head> <body> <div class="table"> <div class="table-row"> <div class="header table-cell">Header</div> </div> <div class="table-row"> <div class="table-cell">Column 1</div> <div class="table-cell">Column 2</div> </div> </div> </body> </html></s>
<|user|> Rewrite this HTML code so that it is valid HTML5. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Example website</title> </head> <body> <h1>My example website</h1> <p>This is some example text</p> </body> </html></s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Example website</title> </head> <body> <h1>My example website</h1> <p>This is some example text</p> </body> </html></s>
<|user|> Create a simple php website using the following data records. [ { "firstname": "Oliver", "lastname": "Smith", "address": "1234 Main Street, City, Country" }, { "firstname": "John", "lastname": "Doe", "address": "5678 Long Road, City, Country" }, { "firstname": "Chris", "lastname": "Fitzgerald", "address": "9123 Eagle Street, City, Country" } ]</s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Simple PHP Website</title> </head> <body> <?php $data = [ [ "firstname" => "Oliver", "lastname" => "Smith", "address" => "1234 Main Street, City, Country" ], [ "firstname" => "John", "lastname" => "Doe", "address" => "5678 Long Road, City, Country" ], [ "firstname" => "Chris", "lastname" => "Fitzgerald", "address" => "9123 Eagle Street, City, Country" ] ]; foreach($data as $person) { echo '<p>'; echo $person['firstname'] . ' ' . $person['lastname'] . '<br/>'; echo $person['address']; echo '</p>'; } ?> </body> </html></s>
<|user|> Using HTML and CSS, create a page to display a list of users with their contact information </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>User Info</title> <style> tr, td { border: 1px solid black; padding: 5px; } </style> </head> <body> <table> <tr> <td>Name</td> <td>Phone Number</td> <td>Email</td> </tr> <tr> <td>John Smith</td> <td>9121231234</td> <td>[email protected]</td> </tr> <tr> <td>John Doe</td> <td>4564564567</td> <td>[email protected]</td> </tr> </table> </body> </html></s>
<|user|> Design an HTML form to enter student name, age, and course. </s> <|assistant|> <html> <head> <title>Student Info Form</title> </head> <body> <form action="/submit" method="POST"> <label>Name:</label><br> <input type="text" name="name"><br><br> <label>Age:</label><br> <input type="number" name="age"><br><br> <label>Course:</label><br> <input type="text" name="course"><br><br> <input type="submit" value="Submit"> </form> </body> </html></s>
<|user|> Write an HTML code to create a basic structure for a website. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My Website</title> </head> <body> </body> </html></s>
<|user|> Create a HTML program to simulate a digital clock </s> <|assistant|> <html> <head> <title>Digital Clock</title> <script> function showTime(){ var date = new Date(); var h = date.getHours(); // 0 - 23 var m = date.getMinutes(); // 0 - 59 var s = date.getSeconds(); // 0 - 59 var session = "AM"; if(h == 0){ h = 12; } if(h > 12){ h = h - 12; session = "PM"; } h = (h < 10) ? "0" + h : h; m = (m < 10) ? "0" + m : m; s = (s < 10) ? "0" + s : s; var time = h + ":" + m + ":" + s + " " + session; document.getElementById("MyClockDisplay").innerText = time; document.getElementById("MyClockDisplay").textContent = time; setTimeout(showTime, 1000); } showTime(); </script> </head> <body> <div> <h2>Digital Clock:</h2> <div id="MyClockDisplay" class="clock"></div> </div> </body> </html></s>
<|user|> Create an HTML page that has a table and populates the table with the given data. Country | Capital India | New Delhi United States | Washington DC Canada | Ottawa</s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Country and Capital Table</title> </head> <body> <h1>Country and Capital Table</h1> <table> <tr> <th>Country</th> <th>Capital</th> </tr> <tr> <td>India</td> <td>New Delhi</td> </tr> <tr> <td>United States</td> <td>Washington DC</td> </tr> <tr> <td>Canada</td> <td>Ottawa</td> </tr> </table> </body> </html></s>
<|user|> Create an HTML page with a button and a text field to print the content of the text field when the button is clicked. </s> <|assistant|> <html> <head> <title>Print Text</title> </head> <body> <input type="text" id="textField" /> <button onclick="printText()">Print</button> <script> function printText(){ let text = document.getElementById("textField").value; console.log(text); } </script> </body> </html></s>
<|user|> Write an HTML page to display three columns with headings ‘Name’, ‘Age’ and ‘Occupation’ in a table layout. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Simple Table Layout</title> </head> <body> <h1>Table with Three Columns</h1> <table> <tr> <th>Name</th> <th>Age</th> <th>Occupation</th> </tr> </table> </body> </html></s>
<|user|> Write a HTML page to set a background color for a table with the color code '#e6e6fa'. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Table with Background Color</title> </head> <body> <h1>Table with Background Color</h1> <table style="background-color: #e6e6fa;"> <tr> <th>Name</th> <th>Age</th> <th>Occupation</th> </tr> </table> </body> </html></s>
<|user|> Create an interface for a number guessing game using HTML, CSS, and JavaScript. </s> <|assistant|> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Number Guessing Game</title> <style> * { padding: 0; margin: 0; } #guessing-game-container { min-height: 100vh; padding: 20px; background: #f5f5f5; text-align: center; } .form-group { display: flex; justify-content: center; align-items: center; flex-direction: column; } </style> </head> <body> <div id="guessing-game-container"> <div> <h1>Guess a number between 1 and 100!</h1> </div> <div class="form-group"> <label for="guess">Guess:</label> <input type="number" id="guess"> </div> <button id="submit-guess-btn">Submit</button> <div id="guess-notification"> </div> </div> </body> <script> const minNum = 1; const maxNum = 100; let correctNum = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum; const submitBtn = document.getElementById("submit-guess-btn"); const guessNotification = document.getElementById("guess-notification"); submitBtn.addEventListener("click", function() { const guessInput = document.getElementById("guess"); const guess = parseInt(guessInput.value); if (Number.isNaN(guess)) { guessNotification.innerHTML = "Please enter a valid number"; } else if (guess < minNum || guess > maxNum) { guessNotification.innerHTML = `Number must be between ${minNum} and ${maxNum}`; } else if (guess !== correctNum) { guessNotification.innerHTML = `Guess is ${guess < correctNum ? "too low" : "too high"}`; } else { guessNotification.innerHTML = "Correct!"; } }); </script> </html></s>
<|user|> Generate a valid HTML page given the body contents. <h1>Hello World!</h1> <p>This is a simple HTML page.</p></s> <|assistant|> <html> <head> </head> <body> <h1>Hello World!</h1> <p>This is a simple HTML page.</p> </body> </html></s>
<|user|> Create a simple webpage to welcome visitors with a centered heading "Welcome". </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Welcome</title> <style> h1 { text-align: center; } </style> </head> <body> <h1>Welcome</h1> </body> </html></s>
<|user|> Create a HTML web page with a header, a body and a footer section. </s> <|assistant|> <html> <head> <title>My Web Page</title> </head> <body> <!-- content goes here --> </body> <footer> <!-- footer content goes here --> </footer> </html></s>
<|user|> Create a web page that contains three input boxes for a user to input name, age, and gender. </s> <|assistant|> <html> <head> <title>Input Form</title> </head> <body> <form> Name:<br> <input type="text" name="name"><br> Age:<br> <input type="number" name="age"><br> Gender:<br> <input type="radio" name="gender" value="male"> Male<br> <input type="radio" name="gender" value="female"> Female<br><br> <input type="submit"> </form> </body> </html></s>
<|user|> Create a basic HTML skeleton for a web page. </s> <|assistant|> <html> <head> <title>Basic Webpage</title> </head> <body> </body> </html></s>
<|user|> Create a basic form in HTML containing two input boxes for first name and surname. </s> <|assistant|> <html> <head> <title>User Information Form</title> </head> <body> <form> First Name:<br> <input type="text" name="firstname"><br> Surname:<br> <input type="text" name="surname"><br><br> <input type="submit"> </form> </body> </html></s>
<|user|> Create a basic HTML page with a <title> tag and a <h1> tag. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Create a basic HTML page</title> </head> <body> <h1>Hello, World!</h1> </body> </html></s>
<|user|> Create a HTML page that takes two text strings as inputs and outputs the longest one. </s> <|assistant|> <html> <head> <title>Input and Compare Strings</title> </head> <body> Enter two strings: <input type="text" id="str1" /> <input type="text" id="str2" /> <input type="button" value="Submit" onclick="compareStrings()" /> <div id="result"/> <script> function compareStrings() { let str1 = document.getElementById("str1").value; let str2 = document.getElementById("str2").value; let longest = (str1.length > str2.length) ? str1 : str2; document.getElementById("result").innerHTML = "The longest string is: " + longest; } </script> </body> </html></s>
<|user|> Write a HTML form to take in two user inputs and display their sum. </s> <|assistant|> <html> <body> <form> Enter Number 1: <input type="text" name="num1" /> <br /> Enter Number 2: <input type="text" name="num2" /> <br /> <input type="submit" value="Submit" /> </form> <script> function calculateSum() { let num1 = document.forms["form"]["num1"].value; let num2 = document.forms["form"]["num2"].value; document.write("Sum of the two numbers is: " + (num1 + num2)); } </script> </body> </html></s>
<|user|> Construct an HTML form with five input fields: Name, Username, Password, Email, and Phone number. </s> <|assistant|> <html> <body> <form> <label for="name">Name:</label> <input type="text" id="name" name="name"> <br> <label for="username">Username:</label> <input type="text" id="username" name="username"> <br> <label for="password">Password:</label> <input type="password" id="password" name="password"> <br> <label for="email">Email:</label> <input type="text" id="email" name="email"> <br> <label for="phone">Phone number:</label> <input type="number" id="phone" name="phone"> <br> </form> </body> </html></s>
<|user|> Format the following HTML tags correctly. <html><head> <title>hello world</title></head></html></s> <|assistant|> <html> <head> <title>Hello World</title> </head> </html></s>
<|user|> Create an HTML page with a Table, which lists out the names and usernames of 4 people. Jenny, jenny123 John, john123 Alice, alice123 Bob, bob123</s> <|assistant|> <!DOCTYPE html> <html> <head> <title>Table example</title> </head> <body> <h1>Names and Usernames</h1> <table> <thead> <tr> <th>Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>Jenny</td> <td>jenny123</td> </tr> <tr> <td>John</td> <td>john123</td> </tr> <tr> <td>Alice</td> <td>alice123</td> </tr> <tr> <td>Bob</td> <td>bob123</td> </tr> </tbody> </table> </body> </html></s>
<|user|> Build a HTML page using the given CSS class CSS Classes: .container { width: 300px; height: 200px; background-color: blue; } .text { color: white; font-family: Arial; font-size: 16px; padding: 15px; text-align: center; }</s> <|assistant|> <html> <head> <style> .container { width: 300px; height: 200px; background-color: blue; } .text { color: white; font-family: Arial; font-size: 16px; padding: 15px; text-align: center; } </style> </head> <body> <div class="container"> <div class="text">Hello World!</div> </div> </body> </html></s>
<|user|> Edit this HTML code to add a link element in the head of the page. <html> <head> <title>Example page</title> </head> <body> </body> </html></s> <|assistant|> <html> <head> <title>Example page</title> <link href="style.css" rel="stylesheet"> </head> <body> </body> </html></s>
<|user|> Create a web page that shows a short biography of the given person. Person: Marie Curie</s> <|assistant|> <html> <head> <title>Biography of Marie Curie</title> </head> <body> <h1>Marie Curie</h1> <p>Marie Curie (1867-1934) was a Polish physicist and chemist who conducted pioneering research on radioactivity and discovered the elements radium and polonium. She was twice awarded the Nobel Prize, first in physics in 1903, and again in 1911 in chemistry. She is one of the most famous female scientists in history, and continues to be an inspiration to scientists around the world.</p> </body> </html></s>
<|user|> Generate the HTML code for a page with a centered headline that says "My Portfolio". </s> <|assistant|> <html> <head> <title>My Portfolio</title> </head> <body> <center> <h1>My Portfolio</h1> </center> </body> </html></s>
<|user|> Edit the following HTML structure to include the Bootstrap 4 library. <html> <head> <title>My Web Page</title> </head> <body> </body> </html></s> <|assistant|> <html> <head> <title>My Web Page</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script> </head> <body> </body> </html></s>
<|user|> Create an HTML page containing a login form with the following fields: username, password, and submit button. </s> <|assistant|> <html> <head> <title>Login Form</title> </head> <body> <form action="/login" method="POST"> <input type="text" name="username" placeholder="Username"/> <input type="password" name="password" placeholder="Password"/> <input type="submit" value="Submit"/> </form> </body> </html></s>
<|user|> Create an HTML page with a text input form and a submit button. </s> <|assistant|> <html> <head> <title>Text Input Form</title> </head> <body> <form action="/submit" method="POST"> <input type="text" name="input" placeholder="Enter Text"/> <input type="submit" value="Submit"/> </form> </body> </html></s>
<|user|> Write an HTML page that displays a table containing the following columns: "Name", "Age", and "Marital Status". </s> <|assistant|> <html> <head> <title>Example Table</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> <th>Marital Status</th> </tr> <tr> <td>John</td> <td>25</td> <td>Single</td> </tr> <tr> <td>Jane</td> <td>30</td> <td>Married</td> </tr> </table> </body> </html></s>
<|user|> Construct a basic HTML page that renders a heading, a description of the page, and a photo. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My Page</title> </head> <body> <h1>My Page</h1> <p>This is my first HTML page.</p> <img src="sample-image.jpg" alt="sample image"> </body> </html></s>
<|user|> Create a HTML page with a list of items. </s> <|assistant|> <html> <head> <title>My List</title> </head> <body> <h1>My List</h1> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </body> </html></s>
<|user|> Create a website using HTML and CSS. </s> <|assistant|> <!DOCTYPE html> <html> <head> <title>My Website</title> <link rel="stylesheet" href="style.css"> <head> <body> <h1>My Website</h1> <div class="content"> Content goes here. </div> </body> </html> //style.css body { font-family: sans-serif; font-size: 14px; color: #000; background-color: #fff; } h1 { text-align: center; color: #444; font-size: 20px; margin-top: 20px; } .content { font-size: 12px; padding: 10px; }</s>
<|user|> Write HTML code to create a navigation bar with links to Home and About pages. </s> <|assistant|> <div> <ul> <li><a href="/home">Home</a></li> <li><a href="/about">About</a></li> </ul> </div></s>
<|user|> Create a HTML page which includes a header, subheader and a paragraph of text. </s> <|assistant|> <html> <head> <title>My Page</title> </head> <body> <h1>My Page</h1> <h2>Subheader</h2> <p>This is some text in my page.</p> </body> </html></s>