html jq code example

Example 1: jquery set html of element

$("button").click(function(){
  $("p").html("Hello <b>world</b>!");
});

Example 2: innerhtml jquery

var itemtoReplaceContentOf = $('#regTitle');
itemtoReplaceContentOf.html('');
newcontent.appendTo(itemtoReplaceContentOf);

Example 3: jq for html

Install pup command for structuring in html format outputs into lines:
brew install pup
Then you can use pup command to split, parse or wrap html outputs:
cat file.html | pup #html is parsed into an optimally visible format
cat file.html | pup 'span#See_also' #filters span tags with See_also id