I wish to target an html element (
<script>) and wrap it by having an html comment string (
out of this:
If you wish to prevent loading wordpress scripts you need to use
wp_dequeue_script( $handle ) function. If will find description of $handle (default wordpress scripts) here.
If you wish to prevent loading wordpress styles you need to use
wp_dequeue_style( $handle ) function.
You need to use this function after wordpress add default script and designs. You should use hook wordpress_enqueue_script rich in priority param (therefore it runs last):
add_action('wp_enqueue_scripts', 'my_enquue_scripts', 100);
In case your primary theme have hardcoded scripts and designs in header.php - then you definitely cannot prevent loading from functions.php