حديقة يُوسُف الرقمية | yshalsager's Digital Garden

Home

❯

yshalsager's Digital Garden

❯

Notes

❯

Programming Notes

❯

JavaScript linking with HTML

JavaScript linking with HTML

Jun 20, 2022

  • ملاحظة_مؤرشفة
  • javascript

المعرفة:: JavaScript
الحالة:: ملاحظة_مؤرشفة
المراجع:: JavaScript Essential Training


Where to put JavaScript code?

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script

Inline: in an HTML document

<script>  
  const allCode = document.querySelectorAll("code");  
  
  for (let item of allCode) {  
    item.innerHTML = `&lt;${item.innerHTML}&gt;`;  
  }  
</script>  

External file

<script src="script.js"></script>  

Graph View

  • Where to put JavaScript code?
  • Inline: in an HTML document
  • External file

Backlinks

  • JavaScript Essential Training Notes

Recent Notes

  • حديقة يُوسُف الرقمية

    Jul 16, 2026

    • ملاحظات حديقة يُوسُف الرقمية

      Jul 16, 2026

      • yshalsager's Digital Garden

        Jul 16, 2026

        Created with Quartz v5.0.0 © 2026

        • Website
        • GitHub