mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-25 23:02:05 -04:00
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:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user