A page component is a distinct part of a web page, such as its header, navigation, content area, sidebar, or footer. Requesting each component separately can produce more satisfying results than asking for the whole page at once; combine the copied code in one HTML file and deploy after all components are added. section 1.4.5
Repeat the prompt-copy-save process according to what you are building:
- For a multi-page website, create and save each page separately. section 1.4.5
- For one page with multiple components, prompt for each component, combine the generated code in the same HTML file, then deploy the finished page. section 1.4.5
A book club page
A book club page can include a header with its logo, title, and tagline; main content with sections for a welcome, the current book, and the next meetup; and a footer with a copyright notice and social links. A prompt can also specify CSS formatting such as colors, fonts, and maximum page width. section 4.2.6
I want to build a web page for a book club. I don't know how to code, so I need you to provide the code for me. First, write the HTML code for a web page that includes the following: * A header element that includes an image named logo.png, the title "Code & Prose", and the tagline "Diving deep into the narrative side of code". * A main element that contains three sections. * The first section contains the second-level heading "Welcome!", followed by a paragraph that contains the text between the triple quotation marks: """Welcome to Code & Prose, the only book club in the world that (we think) reads fiction related to web development.""". * A second section that begins with the second-level heading "What We're Reading". * In the second section, include the image named book-cover.png, followed by the text between the triple quotation marks, where each word or phrase before a colon is bold: """ Title: The Web Designer Author: Paul McFedries Pages: 1,576 Summary: At High Falutin High, [etc.] """ * A third section that begins with the second-level heading "Next Meetup". * In the third section, include the text between the triple quotation marks, where each word or phrase before a colon is bold: """ Date: August 23 Time: 6:00pm Location: The Coder Cafe Questions to ponder: Can Daisy code, or what? Does the book contain too much HTML, or not enough? Why is it so hard for nerds to date? """ * A footer element that includes the text "Copyright" (spelled out, do not include the Copyright symbol), followed by the current year, followed by "Code & Prose". In a separate paragraph, the footer also includes three links to social media accounts: one for Facebook (username: CodeAndProse), Instagram (username: codeandprose), and Twitter (username: codenprose). Second, in a separate file write the CSS code for the following: * The header background color is darkorchid with 10px padding all around. Float the logo to the left and right-align the title and tagline. * The title font size is 48px with color lightsteelblue. * The tagline font size is 24px with color lightsteelblue and formatted as italic. * The second-level heading font size is 30px with color darkorchid and a top margin of 15px. * The main element font size is 20px. * In the second and third sections, the bold text should use the color mediumseagreen. * The image named book-cover.png should be floated to the right. * For the title and headings, use the Fira Sans Extra Condensed Bold font from Google Fonts. For the rest of the text, use the Source Code Pro font from Google Fonts. * The footer background color is darkorchid with 5px padding all around and a 10px top margin. The text color is lightsteelblue. Center the text and social media links. * For the social media links, use the corresponding Font Awesome icons. * The entire page is centered in the browser window. * The page is responsive with a maximum width of 800px.
Use this detailed book club prompt as a model for specifying page structure and content to generate. section 4.2.6
