Codelab Editor
Free Online HTML Editor
Run
Learn JSON
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Basic JSON Access Example | TutsInsider</title> <style> body { font-family: Arial, sans-serif; padding: 20px; background-color: #f8f8f8; } #demo { font-size: 18px; color: #333; margin-top: 10px; } </style> </head> <body> <h2>Access JSON Data in JavaScript</h2> <p>This example shows how to read and display a value from a JSON object.</p> <p id="demo"></p> <script> // Sample JSON object const person = { name: "Alice", age: 28, city: "London" }; // Display the name property document.getElementById("demo").innerHTML = "Name: " + person.name; </script> </body> </html>
Editor Commands
Ctrl
F
Find
Ctrl
G
Find Next
Ctrl
⇧
G
Find Previous
Ctrl
⇧
F
Find & Replace
Ctrl
]
Indent Code Right
Ctrl
[
Indent Code Left
⇧
Tab
Auto Indent Code
Ctrl
/
Line Comment
Ctrl
Alt
/
Block Comment
TutsInsider Actions
Alt
S
Run Code
Ctrl
C
Copy Editor Code
Ctrl
A
Select All Editor Code
Ctrl
S
Save/Download
Ctrl
Alt
X
Rotate
Ctrl
Alt
T
Switch Theme
Ctrl
⇧
C
Open Console
Esc
Close Console