Odds are that this usage is for one or only a few instances, so adding the script to the header would only add code you don't need to your header.php template file. This is achieved by scripting languages and JavaScript is one of the most famous in this regard. If you want to have a script run on some event, such as when a user clicks somewhere, then you will place that script in the head as follows − This code will produce the following results − page. However, static pages are slowly becoming a thing of the past. Placing scripts at the bottom of the element improves the display Save time and effort with JavaScript. For example, look at the paragraph below: I can't wait for … The type attribute is not required. , W3Schools is optimized for learning and training. To use an external script, put the name of the script file in the src (source) attribute of For the occassional or one time use of JavaScript, you need to put the script into a JavaScript file and then call it out from within the post. Sometimes websites needs a menu in their header. Header code is the section available in Weebly site editor facilitating users to add custom HTML, CSS and JavaScript code in the header section of a page, site or blog. ,

A Web Page

A Paragraph