In case of jQuery when you use any HTML tag inside a method you enclose it in double quotes like this
"<div>Anything.....</div>"
Inside these double quotes if you again use double quotes like this
"<div id="divSection" class="newClass">Anything.....</div>"
then editor wont recognize the double quotes of id divSection and class newClass.
There are number of ways you can solve this, One of the way like using single quote inside double quote as below
"<div id='divSection' class='newclass'>Anything.....</div>"
But using this will give SPCAF error if you follow coding standard given by Microsoft as "UseConsistentOfQuotationMarks"
So this is the be best way
$(document).ready(function(){$("#section").append("<div><label for=\"name\">Test</label></div>");});
Here whenever there is a double quotes inside double quotes prefix the inner double quote with a "forward slash" like above