JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="txtName"  data-bind="value: firstName"></br>
<input type="text" id="txtRollNo" data-bind="value: lastName"></br>
    
<span type="text" id="name"  data-bind="text: firstName"></span></br>
<span type="text" id="rollno" data-bind="text: lastName"></span></br>

JavaScript

// This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI
function AppViewModel() {
    this.firstName = "Bert";
    this.lastName = "Bertington";
}

// Activates knockout.js
ko.applyBindings(new AppViewModel());