text
stringlengths
69
2.38k
<s>[INST] <<SYS>> Generate a HTML page with 3 columns using Bootstrap. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bootstrap Example</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> </head> <body> <div class="row"> <div class="col-md-4"> <!-- Your content goes here --> </div> <div class="col-md-4"> <!-- Your content goes here --> </div> <div class="col-md-4"> <!-- Your content goes here --> </div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page that shows the data provided in an interactive table. <</SYS>> data = [ { "id": 1, "first_name": "John", "last_name": "Doe" }, { "id": 2, "first_name": "Amy", "last_name": "Smith" }, { "id": 3, "first_name": "Brian", "last_name": "Green" } ] [/INST] <html> <head> <title>Interactive Table</title> </head> <body> <table> <thead> <tr> <th>ID</th> <th>First Name</th> <th>Last Name</th> </tr> </thead> <tbody> {% for item in data %} <tr> <td>{{ item.id }}</td> <td>{{ item.first_name }}</td> <td>{{ item.last_name }}</td> </tr> {% endfor %} </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that displays one web page with two vertical panenls. <</SYS>> [/INST] <html> <head> <style> #left, #right{ height: 300px; width: 200px; float: left; padding: 10px; background-color: #ddd; } </style> </head> <body> <div contenteditable="true" id="left"></div> <div contenteditable="true" id="right"></div> </body> </html> </s>
<s>[INST] <<SYS>> Generate an HTML page which contains the following elements: a heading, a paragraph, and a button. <</SYS>> [/INST] <html> <head> <title>My HTML Page</title> </head> <body> <h1>Hello World!</h1> <p>This is a simple HTML page created using code.</p> <button>Click Me!</button> </body> </html> </s>
<s>[INST] <<SYS>> Write an HTML program to create a simple page layout. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Simple Page Layout</title> </head> <body> <div>Header Content</div> <div>Body Content</div> <div>Footer Content</div> </body> </html> </s>
<s>[INST] <<SYS>> Edit the following HTML document and add a CSS style to changes the background color to blue. <</SYS>> <html> <head> </head> <body> <h1>Hello, World!</h1> </body> </html> [/INST] <html> <head> <style> body { background-color: blue; } </style> </head> <body> <h1>Hello, World!</h1> </body> </html> </s>
<s>[INST] <<SYS>> How would you edit the following HTML code so that it displays content in two columns? <</SYS>> <div> <p>This is the content</p> </div> [/INST] <div> <div style="float: left; width: 50%;"> <p>This is the content 1</p> </div> <div style="float: right; width: 50%;"> <p>This is the content 2</p> </div> </div> </s>
<s>[INST] <<SYS>> Create an HTML page design for displaying a website homepage. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Website Homepage</title> </head> <body> <h1>Welcome to the website!</h1> <p>This is the homepage for a new website.</p> <ul> <li> About Us </li> <li> Services </li> <li> Contact Us </li> </ul> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page using HTML and CSS which displays a user interface for a calculator. <</SYS>> [/INST] <html> <head> <title>Calculator Webpage</title> </head> <body> <h1>Calculator</h1> <div class="container"> <div class="display"> <p>0</p> </div> <div class="keypad"> <div class="number-pad"> <button type="button">7</button> <button type="button">8</button> <button type="button">9</button> <button type="button">4</button> <button type="button">5</button> <button type="button">6</button> <button type="button">1</button> <button type="button">2</button> <button type="button">3</button> <button type="button">0</button> </div> <div class="operator-pad"> <button type="button" class="operator">/</button> <button type="button" class="operator">*</button> <button type="button" class="operator">+</button> <button type="button" class="operator">-</button> <button type="button" class="operator">=</button> </div> </div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Update the following HTML page so that it refreshes the page every 5 seconds. <</SYS>> <html> <head> <title>My Webpage</title> </head> <body> Hello World! </body> </html> [/INST] <html> <head> <title>My Webpage</title> <meta http-equiv="refresh" content="5"> </head> <body> Hello World! </body> </html> </s>
<s>[INST] <<SYS>> Make an HTML webpage with a heading "Welcome to my webpage!" and a paragraph with the text "This is my first webpage!". <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Webpages</title> </head> <body> <h1>Welcome to my webpage!</h1> <p>This is my first webpage!</p> </body> </html> </s>
<s>[INST] <<SYS>> Modify the CSS in the given HTML code to style the web page <</SYS>> <html> <head> <title>Styled Page</title> </head> <body> <h1>Styled Page</h1> </body> </html> [/INST] <html> <head> <title>Styled Page</title> <style type="text/css"> body { background-color: white; } h1 { font-family: 'Arial', sans-serif; font-size: 30px; color: black; text-align: center; } </style> </head> <body> <h1>Styled Page</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that has two paragraphs, a heading and a link to a website. <</SYS>> Link: https://example.com Heading: Example Website Paragraph 1: This is the first paragraph. Paragraph 2: This is the second paragraph. [/INST] <html> <head> <title>Example Website</title> </head> <body> <h1>Example Website<h1> <p>This is the first paragraph.</p> <p>This is the second paragraph.</p> <a href="https://example.com">Link to Website</a> </body> </html> </s>
<s>[INST] <<SYS>> Edit the following HTML page to add a new heading and a link. <</SYS>> <html> <head> <title>Example Site</title> </head> <body> <h1>Hello World!</h1> <p>This is a Sample Page.</p> </body> </html> Link: http://example.com Heading: Sample Page [/INST] <html> <head> <title>Example Site</title> </head> <body> <h1>Hello World!</h1> <h2>Sample Page</h2> <p>This is a Sample Page</p> <a href="http://example.com">Link</a> </body> </html> </s>
<s>[INST] <<SYS>> Edit the following HTML code to allow Google Chrome to accurately render the page. <</SYS>> <html> <head> <title>My Webpage</title> </head> <body> <table> <tr> <th>Column 1</th> <th>Coloumn 2</th> </tr> </body> </html> [/INST] <html> <head> <title>My Webpage</title> </head> <body> <table> <tr> <th>Column 1</th> <th>Column 2</th> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Design a basic HTML page with a header, footer and a body section. <</SYS>> [/INST] <html> <head> <title>My HTML Page</title> </head> <body> <header> <h1>My Website</h1> </header> <main> This is the main content of the page. </main> <footer> Copyright 20 </s>
<s>[INST] <<SYS>> Write a HTML/CSS code to implement responsive design <</SYS>> [/INST] <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> @media only screen and (max-width: 600px) { #wrap { max-width: 100%; } } </style> </head> <body> <div id="wrap"> <!-- your content --> </div> </body> </html> </s>
<s>[INST] <<SYS>> Construct an HTML form as a comment in the below code. <</SYS>> <div> <!-- TODO: Add a form here --> </div> [/INST] <div> <!-- <form action="submit.php" method="post"> <label for="name">Name:</label><br> <input type="text" id="name" name="name"><br><br> <label for="email">Email:</label><br> <input type="text" id="email" name="email"><br><br> <input type="submit" value="Submit"> </form> --> </div> </s>
<s>[INST] <<SYS>> Create a function in HTML that checks to make sure the provided input is an integer <</SYS>> [/INST] <html> <head> <script> function checkInteger(number) { if(typeof number == 'number') { if(Math.floor(number) == number) return true; } return false; } </script> </head> </s>
<s>[INST] <<SYS>> Write an HTML page which takes in user input and makes an AJAX request to a web server. <</SYS>> [/INST] <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $.ajax({ url: 'https://example.com', type: 'POST', data: $('#user-input').val(), success: function(response) { // Display response from server } }); }); }); </script> </head> <body> <input type="text" id="user-input" /> <button>Send</button> </body> </html> </s>
<s>[INST] <<SYS>> Replace the placeholder in the given HTML document with the corresponding table. <</SYS>> <html> <body> <!-- replace placeholder with table --> </body> </html> <table style="width:100%"> <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> [/INST] <html> <body> <table style="width:100%"> <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>
<s>[INST] <<SYS>> Write a basic HTML page with a div and an unordered list. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Basic HTML Page</title> </head> <body> <div> <ul> <li>list item 1</li> <li>list item 2</li> <li>list item 3</li> </ul> </div> </body> </html> </s>
<s>[INST] <<SYS>> Using the provided HTML structure and jQuery code, change the background color to green when the button is clicked. <</SYS>> <div> <h1>Hello World!</h1> <button>Click me!</button> </div> <script> $(document).ready(function(){ $("button").click(function(){ //TODO: Add code here }); }); </script> [/INST] <div> <h1>Hello World!</h1> <button>Click me!</button> </div> <script> $(document).ready(function(){ $("button").click(function(){ $("div").css("background-color", "green"); }); }); </script> </s>
<s>[INST] <<SYS>> Create an HTML/CSS web page from the following text content. <</SYS>> My favorite food is sushi. [/INST] <html> <head> <title>Sushi</title> <style> // Styling for the page p { font-family: Arial; font-size: 18px; } </style> </head> <body> <p>My favorite food is sushi.</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML document to display the following text: <</SYS>> Welcome to our website! [/INST] <html> <head> <title>Welcome to our Website!</title> </head> <body> <h1>Welcome to our Website!</h1> </body> </html> </s>
<s>[INST] <<SYS>> Generate an HTML page to display text <</SYS>> The text to be displayed: "Hello World" [/INST] <html> <head> <title>Hello World</title> </head> <body> <h1>Hello World</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML and CSS layout to display a list of books with their author, title and description. <</SYS>> Book 1: Author - John, Title - The Catcher in the Rye, Description - “The Catcher in the Rye is a 1951 novel by J. D. Salinger.” Book 2: Author - Jane, Title - Sense and Sensibility, Description - “Sense and Sensibility is a novel by Jane Austen, published in 1811.” [/INST] <html> <head> <style> .book-container{ display: flex; flex-wrap: wrap; } .book{ width: 300px; padding: 10px; border: 1px solid #ccc; margin: 10px; box-sizing : border-box; } .author { font-weight: bold; } .title { font-style: italic; } .description { font-size: 12px; } </style> </head> <body> <div class="book-container"> <div class="book"> <p class="author">Author: John</p> <p class="title">Title: The Catcher in the Rye</p> <p class="description">Description: “The Catcher in the Rye is a 1951 novel by J. D. Salinger.”</p> </div> <div class="book"> <p class="author">Author: Jane</p> <p class="title">Title: Sense and Sensibility</p> <p class="description">Description: “Sense and Sensibility is a novel by Jane Austen, published in 1811.”</p> </div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML & CSS website template featuring a header with a website logo. <</SYS>> [/INST] <html> <head> <title>My Website</title> </head> <body> <header> <div class = "logo"> <img src = "logo.png" alt = "Website Logo" /> </div> </header> <!-- other code--> </body> </html> /* CSS Code */ header { background-color: #ccc; padding: 30px 0; } .logo { text-align: center; } /* Other Styles */ </s>
<s>[INST] <<SYS>> Write an HTML page that displays one heading and two paragraphs. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>Heading</h1> <p>Paragraph 1</p> <p>Paragraph 2</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that includes three buttons with labels "A", "B" and "C". <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <button>A</button> <button>B</button> <button>C</button> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML web page that contains two text fields and two buttons <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Two Text Fields and Two Buttons</title> </head> <body> <form action=""> <input type="text" placeholder="Input 1" /> <input type="text" placeholder="Input 2" /> <button type="submit">Button 1</button> <button type="reset">Button 2</button> </form> </body> </html> </s>
<s>[INST] <<SYS>> Use the given HTML markup to generate a web page with a headline, body and paragraphs. <</SYS>> <h1>My web page</h1> [/INST] <html> <head> <title>My web page</title> </head> <body> <h1>My web page</h1> <p>This is my web page.</p> <p>It contains some information about me.</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that displays the following text in the body: "Hello World!". <</SYS>> [/INST] <html> <head> </head> <body> Hello World! </body> </html> </s>
<s>[INST] <<SYS>> Generate a valid HTML document. <</SYS>> [/INST] <html> <head> <title>My HTML Document</title> </head> <body> <h1>My website</h1> <div> <p>This is my website content.</p> </div> </body> </html> </s>
<s>[INST] <<SYS>> Write an HTML program to display an output as a table. <</SYS>> [/INST] <html> <head> <title>Table example</title> </head> <body> <table border = "1"> <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> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that displays a list of users and their ages. <</SYS>> Alice: 25 Bob: 27 Carol: 30 [/INST] <!DOCTYPE html> <html> <head> <title>User Ages</title> </head> <body> <ul> <li>Alice: 25</li> <li>Bob: 27</li> <li>Carol: 30</li> </ul> </body> </html> </s>
<s>[INST] <<SYS>> Create a Drupal 8 theme that implements a 3 column layout with a header, side bar, content and footer. <</SYS>> [/INST] <html> <head> <title>{{ site.name }}</title> <style> body { display: flex; flex-direction: column; } header, footer { flex-basis: 10%; } main { flex-basis: 80%; display: flex; } #sidebar { flex-basis: 20%; } #content { flex-basis: 80%; } </style> </head> <body> <header> {% include 'head.html.twig' %} </header> <main> <div id="#sidebar"> {% include 'sidebar.html.twig' %} </div> <div id="content"> {% block content %} {% endblock %} </div> </main> <footer> {% include 'footer.html.twig' %} </footer> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page with an ordered list of items using <</SYS>> Five items: apple, banana, orange, strawberry, and lemon. [/INST] <html> <body> <ol> <li>Apple</li> <li>Banana</li> <li>Orange</li> <li>Strawberry</li> <li>Lemon</li> </ol> </body> </html> </s>
<s>[INST] <<SYS>> Develop a web page that displays the current temperature in various cities. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Weather Tracker</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>Current Weather</h1> <div class="data-table"></div> <script> $(function() { $.get('https://weather-tracker-server.herokuapp.com', function(data) { var cityNames = []; var temperatures = []; $(data).each(function(index, item) { cityNames.push(item.name); temperatures.push(item.temperature); }); $('.data-table').append(`<span>City</span><span>Temperature</span>`); for (var i = 0; i < data.length; i++) { $('.data-table').append(`<span>${cityNames[i]}</span><span>${temperatures[i]}</span>`); } }); }); </script> </body> </html> </s>
<s>[INST] <<SYS>> Generate an HTML element <</SYS>> [/INST] <html> <body> </body> </html> </s>
<s>[INST] <<SYS>> Write an HTML page including 1 form element <</SYS>> Form Element: text area control [/INST] <html> <head> <title>Form Element</title> </head> <body> <form action=""> <textarea placeholder="Enter your text here..." rows="4" cols="50"></textarea> <input type="submit" value="Submit"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Generate a HTML code to display a basic webpage with <</SYS>> Heading: Welcome Text: Hello World! [/INST] <html> <head> <title>Welcome</title> </head> <body> <h1>Welcome</h1> <p>Hello World!</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a layout consisting of 3 containers: one on the left and two on the right. <</SYS>> [/INST] <html> <head> </head> <style> #container{ width: 100%; display: flex; } #left-container{ width: 20%; } #right-containers{ width: 80%; display: flex; } #right-container1{ width: 50%; } #right-container2{ width: 50%; } </style> <body> <div id="container"> <div id="left-container"> <!-- Left Container Content --> </div> <div id="right-containers"> <div id="right-container1"> <!-- Right Container 1 Content --> </div> <div id="right-container2"> <!-- Right Container 2 Content --> </div> </div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Set up a basic HTML page with a title that says "My Web Page". <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>My Web Page</title> </head> <body> </body> </html> </s>
<s>[INST] <<SYS>> Generate an HTML form in PHP to gather user information such as name and address. <</SYS>> [/INST] <html> <head> <title>User Form</title> </head> <body> <form action="process_form.php" method="post"> Name: <input type="text" name="name"><br> Address: <input type="text" name="address"><br> <input type="submit" value="Submit"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML webpage with a main navigation at the top. <</SYS>> [/INST] <html> <head> <meta charset="utf-8"> <title>Navigation</title> </head> <body> <nav> <ul> <li><a href="home.html">Home</a></li> <li><a href="about.html">About</a></li> <li><a href="blog.html">Blog</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </body> </html> </s>
<s>[INST] <<SYS>> Generate a proper HTML page. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> <h1>This is a Heading</h1> <p>This is a paragraph.</p> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page that displays the Date and Time in the header. <</SYS>> [/INST] <html> <head> <title>Date and Time</title> </head> <body> <h3 id="date"><script>document.getElementById("date").innerHTML = Date()</script></h3> </body> </html> </s>
<s>[INST] <<SYS>> Design a user interface in HTML for a login form. <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login Form</title> </head> <body> <form> <label>Username:</label> <input type="text" name="username" required> <label>Password:</label> <input type="password" name="password" required> <input type="submit" value="Login"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Design a web page in HTML5 with a heading, a paragraph and a button. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>My Web Page</title> </head> <body> <h1>This is my title</h1> <p>This is some content.</p> <button>Click Me!</button> </body> </html> </s>
<s>[INST] <<SYS>> Generate HTML code to create a login page with a username and password field. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Login</title> </head> <body> <div> <h1>Login</h1> <form id="loginForm" action="" method="post"> <label>Username:</label> <input type="text" name="username" required/> <label>Password:</label> <input type="password" name="password" required/> <input type="submit" value="Login"/> </form> </div> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML document with a heading "Heading" and a paragraph with the text "Hello, World!" <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Example Document</title> </head> <body> <h1>Heading</h1> <p>Hello, World!</p> </body> </html> </s>
<s>[INST] <<SYS>> Edit the given HTML code to create a paragraph element. <</SYS>> <div>Hello World!</div> [/INST] <div><p>Hello World!</p></div> </s>
<s>[INST] <<SYS>> Develop an HTML page in which you can display a message to the user. <</SYS>> [/INST] <html> <head> <title>Display Message</title> </head> <body> <div> <h1>Welcome!</h1> <p>This page displays a message to the user.</p> </div> </body> </html> </s>
<s>[INST] <<SYS>> Write a HTML structure using semantic tags to list the skills of a web developer. <</SYS>> HTML, CSS, JavaScript, React [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Web Developer Skills</title> </head> <body> <h1>Web Developer Skills</h1> <ul> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> <li>React</li> </ul> </body> </html> </s>
<s>[INST] <<SYS>> Write a HTML to generate a form to login. <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login</title> </head> <body> <form action=""> <label for="username">Username</label> <input type="text" placeholder="Username" name="username"><br><br> <label for="password">Password</label> <input type="password" placeholder="Password" name="password"><br><br> <input type="submit" value="Login"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create HTML code for a web page that has a centered title, a logo, and a colorscheme. <</SYS>> Title: "My Website" Logo: <link to logo file> Color Scheme: #123456, #234567, #345678 [/INST] <html> <head> <title>My Website</title> </head> <body> <h1 align="center">My Website</h1> <img src="<link to logo file>" align="center"> <style> body { background-color: #123456; color: #234567; } h1 { color: #345678; } </style> </body> </html> </s>
<s>[INST] <<SYS>> Create HTML code for a table that has 7 columns and 3 rows. <</SYS>> [/INST] <html> <table> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th>Column 4</th> <th>Column 5</th> <th>Column 6</th> <th>Column 7</th> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> <td>Cell 5</td> <td>Cell 6</td> <td>Cell 7</td> </tr> <tr> <td>Cell 8</td> <td>Cell 9</td> <td>Cell 10</td> <td>Cell 11</td> <td>Cell 12</td> <td>Cell 13</td> <td>Cell 14</td> </tr> </table> </html> </s>
<s>[INST] <<SYS>> Design a HTML page to display a table of students’ grades for a specific subject. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <style> table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; } </style> </head> <body> <h2>Students' Grades</h2> <table> <tr> <th>Name</th> <th>Grade</th> </tr> <tr> <td>John</td> <td>A</td> </tr> <tr> <td>Steve</td> <td>B</td> </tr> <tr> <td>Jane</td> <td>A+</td> </tr> <tr> <td>Jeff</td> <td>C+</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a basic calculator form that takes two numbers as inputs and computes and displays the sum. <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Calculator</title> </head> <body> <h1>Calculator</h1> <form> <label> Number 1: <input type="text" name="num1" /> </label> <br /> <label> Number 2: <input type="text" name="num2" /> </label> <br /> <button type="submit">Calculate</button> </form> <p id="answer"></p> <script> let form = document.querySelector("form"); form.addEventListener("submit", e => { e.preventDefault(); let nums = form.querySelectorAll("input[name=num]"); let sum = 0; for (let n of nums) { sum += parseInt(n.value); } document.getElementById("answer").textContent = `The sum is: ${sum}`; }); </script> </body> </html> </s>
<s>[INST] <<SYS>> Develop a CSS/HTML page with a 3-column layout and a sticky navigation bar. <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Layout</title> <style> .row { display: flex; flex-wrap: wrap; } .column { flex: 25%; } #nav { position: sticky; top: 0; background-color: #000; padding: 10px; text-align: center; } </style> </head> <body> <div id="nav">Navigation Bar</div> <div class="row"> <div class="column">Column1</div> <div class="column">Column2</div> <div class="column">Column3</div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page with an input field and a button to reset the field. <</SYS>> [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Input field and Reset button</title> </head> <body> <input type="text" placeholder="Type something"> <button onclick="resetInput()">Reset</button> <script> function resetInput() { document.querySelector('input[type="text"]').value = ''; } </script> </body> </html> </s>
<s>[INST] <<SYS>> Edit the given HTML code to add a title tag inside the head tag. <</SYS>> <html> <head> </head> <body> <h1>My Website</h1> </body> </html> [/INST] <html> <head> <title>My Website</title> </head> <body> <h1>My Website</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page that takes your name as input and welcomes you on page load. <</SYS>> [/INST] <html> <body> <script> function onPageLoad() { var name = prompt('Please enter your name: '); alert('Welcome ' + name + '!'); } onPageLoad(); </script> </body> </html> </s>
<s>[INST] <<SYS>> Create a webpage using HTML and CSS that has a navigation bar with a logo, five links to different webpages, and a footer. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>My Webpage</title> <meta charset="utf-8"> <style> body { background-color: #f1f1f1; } .navbar { overflow: hidden; background-color: #444; } .navbar a { float: left; display: block; color: white; text-align: center; padding: 14px 20px; text-decoration: none; } .navbar a:hover { background-color: #555; color: white; } .main { padding: 16px; margin-top: 30px; height: 1500px; background-color: #f1f1f1; } .footer { color: grey; padding: 8px; text-align: center; background-color: #f1f1f1; } .logo { float: left; height: 50px; width: 50px; } </style> </head> <body> <div class="navbar"> <img class="logo" src="logo.png" alt="logo" /> <a href="home.html">Home</a> <a href="contact.html">Contact</a> <a href="about.html">About</a> <a href="products.html">Products</a> <a href="services.html">Services</a> </div> <div class="main"> // Content will be here </div> <div class="footer"> Copyright &copy; Company 2020 </div> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a form that has two inputs: Name and Email. <</SYS>> [/INST] <html> <head> <title>Submission Form</title> </head> <body> <form> <label for="name">Name: </label> <input type="text" name="name" id="name" /> <label for="email">Email: </label> <input type="email" name="email" id="email" /> <input type="submit" value="Submit" /> </form> </body> </html> </s>
<s>[INST] <<SYS>> Using HTML/CSS and JavaScript, construct a web page that generates a random password. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Random Password Generator</title> <script src="generate.js"></script> <style> body { background-color: lightblue; } #container { margin: 0 auto; width: 500px; background-color: white; padding: 30px; } #password { font-size: 20px; font-weight: bold; } </style> </head> <body> <div id="container"> <h1>Random Password Generator</h1> <h2>Your Password:</h2> <div id="password"></div> <button onclick="generatePassword()">Generate</button> </div> </body> </html> // JavaScript code in a file called 'generate.js' // function generatePassword() { let password = Math.random().toString(36).substring(2, 10); document.getElementById("password").innerHTML = password; } </s>
<s>[INST] <<SYS>> Create an HTML page with a heading "Welcome to My Site". <</SYS>> [/INST] <html> <head> <title>Welcome to My Site</title> </head> <body> <h1>Welcome to My Site</h1> </body> </html> </s>
<s>[INST] <<SYS>> Correct the syntax error in the following HTML structure. <</SYS>> <div> <h1>My Web Page</h> <div/> [/INST] <div> <h1>My Web Page</h1> </div> </s>
<s>[INST] <<SYS>> Create an HTML form in which a user can input text and a button to submit. <</SYS>> [/INST] <html> <body> <form> <input type="text" name="input"> <input type="submit" value="Submit"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML page with a paragraph and a button to toggle the paragraph's text color between red and blue. <</SYS>> [/INST] <html> <head> <title>Color Toggle</title> <script> let isRed = true; let toggleButton = document.getElementById('toggle-button'); toggleButton.addEventListener('click', () => { let paragraph = document.getElementsByTagName('p')[0]; paragraph.style.color = isRed ? 'blue' : 'red'; isRed = !isRed; }); </script> </head> <body> <p>This is a paragraph.</p> <button id='toggle-button'>Toggle color</button> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page containing two buttons. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Buttons</title> </head> <body> <input type="button" value="Button 1" /> <input type="button" value="Button 2" /> </body> </html> </s>
<s>[INST] <<SYS>> Using HTML and CSS, create a web page that lists all of the fruits in the given array. <</SYS>> fruits = ["apple", "orange", "banana", "pear", "mango"] [/INST] <html> <head> <title>Fruit List</title> </head> <body> <ul> <li>Apple</li> <li>Orange</li> <li>Banana</li> <li>Pear</li> <li>Mango</li> </ul> </body> </html> </s>
<s>[INST] <<SYS>> Use JavaScript and HTML to create a form with 3 input fields and a submit button. <</SYS>> [/INST] <html> <head> <script> // JavaScript code </script> </head> <body> <form> <input type="text" name="field1" /> <input type="text" name="field2" /> <input type="text" name="field3" /> <input type="submit" name="submit" value="Submit" /> </form> </body> </html> </s>
<s>[INST] <<SYS>> Construct a HTML page for a registration form. <</SYS>> [/INST] <html> <head> <title>Registration Form</title> </head> <body> <h1>Registration Form</h1> <form action="register.php" method="POST"> <div class="form-row"> <label>Username:</label> <input type="text" name="username" required> </div> <div class="form-row"> <label>Email:</label> <input type="email" name="email" required> </div> <div class="form-row"> <label>Password:</label> <input type="password" name="password" required> </div> <div class="form-row"> <input type="submit" value="Register"> </div> </form> </body> </html> </s>
<s>[INST] <<SYS>> Generate a HTML code that will create an alert message with the text “You pressed the button!” <</SYS>> [/INST] <html> <head> <script> function alert_button(){ alert("You pressed the button!"); } </script> </head> <body> <button onclick="alert_button()">Click Here</button> </body> </html> </s>
<s>[INST] <<SYS>> Create a HTML form to submit a text entry and view it after submission. <</SYS>> [/INST] <html> <head> <script> function submitForm(){ var formData = document.getElementById("textEntry").value; alert("You said: "+ formData); } </script> </head> <body> <form> <input type="text" id="textEntry"> <input type="button" value="Submit" onclick="submitForm()"> </form> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page with HTML/CSS that consists of three circles of different colors and different sizes. <</SYS>> [/INST] <html> <head> <style> div { width: 100px; height: 100px; border-radius: 50%; } #circle1 { background-color: red; } #circle2 { background-color: green; width: 80px; height: 80px; } #circle3 { background-color: blue; width: 60px; height: 60px; } </style> </head> <body> <div id="circle1"></div> <div id="circle2"></div> <div id="circle3"></div> </body> </html> </s>
<s>[INST] <<SYS>> Generate an HTML page on the browser with the text "Hello world." <</SYS>> [/INST] <html> <head> </head> <body> Hello world. </body> </html> </s>
<s>[INST] <<SYS>> Create a web page that prints out the return value of the following function call in the browser. <</SYS>> function addTwoNumbers(a,b){ return a+b; } [/INST] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My Page</title> </head> <body> <p>The result of addTwoNumbers(1,2) is <span id="result"></span></p> <script> function addTwoNumbers(a,b){ return a+b; } var result = addTwoNumbers(1,2); document.getElementById("result").innerHTML = result; </script> </body> </html> </s>
<s>[INST] <<SYS>> Design a UI layout in HTML and CSS for an About Us page. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title> About Us </title> <style> body { font-family: Arial; } .container { width: 90%; margin: auto; padding: 10px; } .about-us-header { font-size: 20px; } .about-us-content { font-size: 16px; } </style> </head> <body> <div class="container"> <div class="about-us-header"> <h1>About Us</h1> </div> <div class="about-us-content"> <p> We are a team of experienced web developers and designers dedicated to providing you with high-quality web services. </p> </div> </div> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page with the headline "Welcome to Python programming". <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Welcome to Python Programming</title> </head> <body> <h1>Welcome to Python Programming</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page to display the employee details. <</SYS>> Employee Name: Oliver Smith Age: 35 Role: Marketing Executive [/INST] <html> <head> <title>Employee Details</title> </head> <body> <h1>Employee Details</h1> <p>Name: Oliver Smith</p> <p>Age: 35</p> <p>Role: Marketing Executive</p> </body> </html> </s>
<s>[INST] <<SYS>> Write a web page in HTML to view a list of books <</SYS>> [/INST] <html> <head> <title>List of Books</title> </head> <body> <h1>List of Books</h1> <ul> <li>The Alchemist</li> <li>Life of Pi</li> <li>The Great Gatsby</li> <li>The Catcher in the Rye</li> <li>Harry Potter and the Sorcerer's Stone</li> </ul> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page displaying the results from a given query. <</SYS>> [/INST] <html> <head> <title>Query Results</title> </head> <body> <table> <thead> <tr> <th>Field1</th> <th>Field2</th> <th>Field3</th> </tr> </thead> <tbody> <?php $query_result = execute_query(); while($row = $query_result->fetch_assoc()){ echo '<tr> <td>'.$row['field1'].'</td> <td>'.$row['field2'].'</td> <td>'.$row['field3'].'</td> </tr>'; } ?> </tbody> </table> </body> </html> </s>
<s>[INST] <<SYS>> Design an HTML page to display a timer with minutes and seconds. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Timer</title> </head> <body> <h1>Timer</h1> <p> <span id="minutes">00</span>:<span id="seconds">00</span> </p> <script> let minutes = 0; let seconds = 0; setInterval(function(){ seconds++; if (seconds >= 60) { minutes++; seconds = 0; } document.getElementById("minutes").innerHTML = minutes; document.getElementById("seconds").innerHTML = seconds; }, 1000); </script> </body> </html> </s>
<s>[INST] <<SYS>> Edit the following HTML code to add a link to an external website. <</SYS>> <div> <p>Hello!</p> </div> [/INST] <div> <p>Hello! <a href="https://www.example.com" target="_blank">Visit my website</a></p> </div> </s>
<s>[INST] <<SYS>> Create an HTML page that displays "Hello World!" when opened in a web browser. <</SYS>> [/INST] <html> <head> <title>Hello World!</title> </head> <body> <h1>Hello World!</h1> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a table containing the name and age of 5 people. <</SYS>> Name Age John 25 Lisa 22 Emily 19 George 21 Samuel 20 [/INST] <html> <head> <title>People Age Table</title> </head> <body> <table> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>John</td> <td>25</td> </tr> <tr> <td>Lisa</td> <td>22</td> </tr> <tr> <td>Emily</td> <td>19</td> </tr> <tr> <td>George</td> <td>21</td> </tr> <tr> <td>Samuel</td> <td>20</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Generate an HTML page using the defined header and footer. <</SYS>> Header: <head> <title>My Page</title> </head> Footer: <div id="footer"> <p>Copyright © 2020 MyPage</p> </div> [/INST] <html> <head> <title>My Page</title> </head> <body> <div id="content"> <h1>My Page</h1> </div> <div id="footer"> <p>Copyright © 2020 MyPage</p> </div> </body> </html> </s>
<s>[INST] <<SYS>> Write an HTML program to display a web page with a table, a heading, and a div <</SYS>> [/INST] <html> <head> <title> Sample Table </title> </head> <body> <h1>My Sample Table</h1> <table> <thead> <tr> <th>Col1</th> <th>Col2</th> </tr> </thead> <tbody> <tr> <td>Row1Value1</td> <td>Row1Value2</td> </tr> </tbody> </table> <div>This is a sample div.</div> </body> </html> </s>
<s>[INST] <<SYS>> Make a HTML page that displays a table displaying numbers from 1 to 10. <</SYS>> [/INST] <html> <body> <h1>Table showing numbers from 1 to 10</h1> <table> <tr> <th>Number</th> </tr> <tr> <td>1</td> </tr> <tr> <td>2</td> </tr> <tr> <td>3</td> </tr> <tr> <td>4</td> </tr> <tr> <td>5</td> </tr> <tr> <td>6</td> </tr> <tr> <td>7</td> </tr> <tr> <td>8</td> </tr> <tr> <td>9</td> </tr> <tr> <td>10</td> </tr> </table> </body> </html> </s>
<s>[INST] <<SYS>> Create an HTML page with a heading and two paragraphs. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>My Page</title> </head> <body> <h1>Welcome</h1> <p>This is the first paragraph in my page.</p> <p>This is the second paragraph in my page.</p> </body> </html> </s>
<s>[INST] <<SYS>> Design an HTML page using standard HTML tags which contains a heading and two paragraphs <</SYS>> [/INST] <html> <head> <title>Example</title> </head> <body> <h1>Heading</h1> <p>Paragraph 1</p> <p>Paragraph 2</p> </body> </html </s>
<s>[INST] <<SYS>> Design a simple HTML page using standard HTML tags which contains an input box, a button and an output section <</SYS>> [/INST] <html> <head> <title>Example</title> </head> <body> <div> <input type="text" id="input"> <button type="submit" onclick="output()">Submit</button> </div> <div id="output"></div> <script> function output() { output.innerHTML = inp.value; } </script> </body> </html> </s>
<s>[INST] <<SYS>> Create a tag cloud to visualize the most frequent words in the following sentence. <</SYS>> The quick brown fox jumps over the lazy dog [/INST] <div> <span class="tag" style="font-size: 300%;">The</span> <span class="tag" style="font-size: 200%;">quick</span> <span class="tag" style="font-size: 250%;">brown</span> <span class="tag" style="font-size: 150%;">fox</span> <span class="tag" style="font-size: 200%;">jumps</span> <span class="tag" style="font-size: 250%;">over</span> <span class="tag" style="font-size: 100%;">the</span> <span class="tag" style="font-size: 150%;">lazy</span> <span class="tag" style="font-size: 200%;">dog</span> </div> </s>
<s>[INST] <<SYS>> Create a website using HTML and CSS that displays "Hello, World!". <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Hello World</title> <style> body { background-color: #eee; text-align: center; padding: 20px; } h1 { font-family: sans-serif; font-size: 2em; letter-spacing: 2px; color: #444; margin-bottom: 20px; } </style> </head> <body> <h1>Hello, World!</h1> </body> </html> </s>
<s>[INST] <<SYS>> Design a basic calculator using HTML, CSS, and JavaScript. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>HTML/CSS/Javascript Calculator</title> <style> * { box-sizing: border-box; } .calculator { width: 425px; background-color: #fafafa; padding: 20px; border-radius: 8px; } .calculator-display { display: flex; align-items: flex-end; padding: 0px 20px; font-size: 2.5rem; font-family: sans-serif; } .calculator-keypad { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 8px; } .calculator-key { background-color: #f0f0f0; width: 100%; height: 80px; border-radius: 8px; font-size: 1.25rem; font-family: sans-serif; font-weight: bold; color: #444; cursor: pointer; } </style> </head> <body> <div class="calculator"> <div class="calculator-display"></div> <div class="calculator-keypad"></div> </div> <script> const calculator = { displayValue: '0', firstOperand: null, waitingForSecondOperand: false, operator: null }; function updateDisplay() { const display = document.querySelector('.calculator-display'); display.innerText = calculator.displayValue; } updateDisplay(); // add event listeners for the calculator buttons </script> </body> </html> </s>
<s>[INST] <<SYS>> Create a web page that displays a message in different languages by using HTML, CSS, and JavaScript. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Hello World in Different Languages</title> <style> body { font-family: sans-serif; background-color: #eee; text-align: center; padding: 20px; } select { background-color: #f0f0f0; font-size: 1rem; padding: 5px 10px; margin-top: 20px; border: none; border-radius: 5px; } button { background-color: #444; color: #fff; font-size: 1rem; padding: 5px 10px; margin-top: 20px; border: none; border-radius: 5px; } .language-message { font-size: 2rem; margin: 20px; color: #444; } </style> </head> <body> <h1>Hello World in Different Languages</h1> <select id="language-selector"> <option value="English">English</option> <option value="French">French</option> <option value="Spanish">Spanish</option> <option value="German">German</option> <option value="Italian">Italian</option> </select> <button type="button" id="language-button">Show!</button> <label class="language-message" id="language-message"></label> <script> // Get language button, message label, and language selector elements const languageButton = document.querySelector('#language-button'); const languageMessage = document.querySelector('#language-message'); const languageSelector = document.querySelector('#language-selector'); let messages = { 'English': 'Hello, World!', 'French': 'Bonjour le monde!', 'Spanish': 'Hola Mundo!', 'German': 'Hallo Welt!', 'Italian': 'Ciao Mondo!' }; languageButton.addEventListener('click', () => { let language = languageSelector.value; languageMessage.innerText = messages[language]; }); </script> </body> </html> </s>
<s>[INST] <<SYS>> Design an interactive game using HTML, CSS and JavaScript. <</SYS>> [/INST] <!DOCTYPE html> <html> <head> <title>Hunted Maze</title> <style> * { box-sizing: border-box; } body{ font-family: sans-serif; background-color: #eee; text-align: center; padding: 20px; } h1 { font-size: 2rem; color: #444; } .maze { position: relative; width: 800px; height: 600px; background-color: #f0f0f0; border-radius: 8px; } .box { position: absolute; width: 25px; height: 25px; background-color: #444; border-radius: 4px; top: 0; left: 0; } </style> </head> <body> <h1>Hunted Maze</h1> <div class="maze"> <div class="box"></div> </div> <script> // add logic for the game </script> </body> </html> </s>