Add a dialog with a message inside.
Acceptance criteria
- 1.Add a dialog with a message inside.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <dialog> Tag chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “The tag represents a dialog box or modal window that can contain interactive content such as text, forms, or buttons. It can be opened or closed using the open attribute or JavaScript methods. The element is ideal for creating pop-ups, confirmation boxes, or form modals without external JavaScript libraries.” .
1.Add a dialogexercise · easy · 10 min
Add a dialog with a message inside.
Passes when: Add a dialog with a message inside.
2.Open itexercise · easy · 10 min · practice plan
Make the dialog visible from the start.
Passes when: Make the dialog visible from the start.
3.Add a close buttonexercise · easy · 10 min · practice plan
Put a close button inside the dialog.
Passes when: Put a close button inside the dialog.
4.Title the dialogexercise · easy · 10 min · practice plan
Add a heading naming the dialog.
Passes when: Add a heading naming the dialog.
5.A confirmation dialogexercise · medium · 10 min · practice plan
Build an open dialog with a title and two buttons.
Passes when: Build an open dialog with a title and two buttons.
6.Fix the div used as a dialogbug fix · easy · 8 min
A modal has its own element.
Passes when: A modal has its own element.
7.Fix the wrong attribute for visibilitybug fix · easy · 8 min · practice plan
A dialog is shown with the open attribute.
Passes when: A dialog is shown with the open attribute.
8.Fix the close control outsidebug fix · easy · 8 min · practice plan
The close button belongs inside the dialog.
Passes when: The close button belongs inside the dialog.
9.Fix the dialog with no titlebug fix · easy · 8 min · practice plan
The dialog does not say what it is asking.
Passes when: The dialog does not say what it is asking.
10.Fix the missing cancel optionbug fix · easy · 8 min · practice plan
A confirmation needs a way out.
Passes when: A confirmation needs a way out.
Between them these tasks cover Modals, open attribute and Close buttons.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.