Materi
Roadmap
Proyek
Sertifikat
Skillance Code Lab
Jalankan »
Skillance Code Lab Editor
Editor
Hasil
Split
Editor Kode Sumber
Tekan
Ctrl + Enter
untuk Menjalankan
<!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> <style> .sorot-emas { background-color: #fca311; color: #0d2e5c; padding: 10px; border-radius: 6px; font-weight: bold; } </style> </head> <body style="font-family: sans-serif; padding: 20px;"> <p id="teksKelas">Klik tombol untuk menyematkan kelas styling warna emas.</p> <button id="btnKelas">Toggle Class</button> <script> $('#btnKelas').click(function() { $('#teksKelas').toggleClass('sorot-emas'); }); </script> </body> </html>
Hasil Tampilan (Browser Preview)
Muat Ulang