JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test1" name="x" >t</div>
<input type="text" id="test3" name="x" />

JavaScript

/* 
    Difference in getting ('name')
*/

var one = $('#test1').prop('name'); // Undefined
var two = $('#test1').attr('name'); // x

var five = $('#test3').prop('name'); // x
var six = $('#test3').attr('name'); // x

/* 
    getting ('id) does work
*/

var three = $('#test1').prop('id'); // test1
var four = $('#test1').attr('id'); // test1