feat(curriculum): Add interactive examples to What Is JavaScript, and How Does It Work with HTML and CSS lesson (#63170)

This commit is contained in:
Clarence Bakosi
2025-10-28 19:51:29 +01:00
committed by GitHub
parent ece9a98ae1
commit e3d5b0ea4b

View File

@@ -5,7 +5,7 @@ challengeType: 19
dashedName: what-is-javascript
---
# --description--
# --interactive--
JavaScript is a powerful programming language that brings interactivity and dynamic behavior to websites.
@@ -15,6 +15,8 @@ For example, when you click a button, submit a form, or hover over a menu, JavaS
Here's an example of how these three work together:
:::interactive_editor
```html
<!DOCTYPE html>
<html>
@@ -32,7 +34,9 @@ Here's an example of how these three work together:
</html>
```
In this example, HTML is used to define the content: a heading (an `h1` tag) and a button (the `button` tag).
:::
In this example, HTML is used to define the content: a heading (an `h1` element) and a button (the `button` element).
CSS is used to apply styles to the heading, such as making the text green. JavaScript is used to display an alert message when the button is clicked.