liveBook · Manning

Page formatting

As explained in Build a Website with ChatGPT

Page formatting is the specification of visual presentation properties such as colors, typography, and layout width for a web page.

Page formatting specifies how a web page looks, including its colors, typography, spacing, and layout width. You describe these choices in a CSS prompt so a code-generation tool can create the styling. section 9.4 section 8.4

A useful formatting request identifies:

  • The page background color and text color. section 9.4
  • Font families and type sizes for headings, titles, taglines, body text, and form controls. section 8.4 section 13.5
  • A maximum page width, such as 800 px, to keep text lines from becoming too long. section 9.4
  • A layout method, such as Flexbox or CSS Grid, and behavior for smaller screens. section 13.5 section 12.2.10

Recipe-page formatting prompt

Ask for CSS that sets the background and text colors, chooses heading and body fonts, assigns type sizes to the site title, tagline, page title, and page text, and limits the page to 800 px wide. Save the generated HTML as index.html and the CSS as styles.css in the same folder, alongside the header image. section 9.4

Second, in a separate file please write the CSS code for the following:

Use the complete CSS-prompt listing as a copyable starting point, then customize its colors, fonts, sizes, width, and layout requirements. section 9.4

How Build a Website with ChatGPT covers it

How deep it goes
Specifies colors, typography, width, and layout choices, but stops short of explaining CSS declarations or styling internals.
Examples
Demonstrates formatting through recipe, event sign-up, course catalog, and article-page prompts, including an 800 px page width.
What it assumes
Assumes only a page idea and desired appearance, while introducing separate HTML and CSS files through generated-code instructions.
What you can do after
Build it from scratch by requesting CSS, saving it as styles.css, linking it from index.html, and customizing the visual requirements.
How it connects
Connects CSS with HTML, typography, Flexbox, CSS Grid, media queries, and responsive web design.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Website with ChatGPT. The section links point to the parts of the book it draws on.