Buttons
Part of the Fundamentals section of Coddy's HTML journey — lesson 44 of 60.
Buttons are interactive elements in HTML used to trigger actions when clicked. To create a button, you use the <button> tag.
Here’s the basic syntax:
<button>Click Me</button>Challenge
EasyCreate an HTML document that includes a button using the <button> tag. Make the button display the text "Press Me".
Cheat sheet
To create a button in HTML, use the <button> tag:
<button>Click Me</button>Try it yourself
<!DOCTYPE html>
<html>
<body>
<!-- Write code here -->
</body>
</html>This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
2Text and Formatting
HeadingsParagraphsLine BreaksBold and Italic TextBold and Italic AgainRecap - Formatting8Forms and Inputs Part 1
Form BasicsText InputsInput AttributesPassword FieldLabels for InputsRecap - Basic Form11Event Registration Page
Project OverviewHeader Section9Forms and Inputs Part 2
Radio ButtonsCheckboxesDropdownsButtonsButtons in FormsRecap - Forms #1Recap - Forms #2