liveBook · Manning

Button

As explained in Build a Website with ChatGPT

A button is an interactive user-interface control that can be activated to trigger an action.

A button is an interactive control that lets someone activate an action. In a form, clicking it tells the browser that the user has finished entering information and wants the form processed. section 8.3.8

A form button works much like an OK button in a computer dialog: the user completes the fields, then clicks the button to continue. Clicking it is called submitting the form. section 8.3.8

When creating a button for a web page:

  • Choose a label that tells users what will happen, such as “Send It” instead of the automatically generated “Submit.” section 8.3.8
  • Place the button inside the form so users can submit the information they entered. section 8.4
  • Check the generated HTML and CSS so the button appears as expected and fits the page design. section 2.2.1

A form button

An event sign-up page can include fields for a volunteer’s information and a button labeled “Send It.” Clicking the button submits the completed form. section 8.3.8 section 8.4

A submit button element with the name "Send It".

Inspect the submit-button example to see how a preferred label such as “Send It” is represented in HTML. section 8.3.8

How Build a Website with ChatGPT covers it

How deep it goes
Explains buttons through a dialog analogy and form submission, but stops short of deeper implementation details.
Examples
Uses OK, Send It, event sign-up, and Generate Pun buttons as concrete examples.
What it assumes
Assumes only a basic understanding of forms and browsers while introducing button behavior through the familiar dialog metaphor.
What you can do after
Builds a form button in generated HTML, choose its label, and use it to submit entered information.
How it connects
Connects buttons with HTML forms, dialog controls, HTML elements, CSS styling, and generated web pages.

Also explained in

Compare how 8 books explain button →

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.