Is my code utilizing proper Object Oriented features? class element {
   constructor(name){
    this.name = name;
   }
   createNew(){
    var elem = document.createElement(this.name);
    document.body.appendChild(elem);
   }
   setElementAttribute(attr_name, attr_value){
    this.attr_name = attr_name;
    this.attr_value = attr_value;
   }
   createNewWithAttribute(){
    var elem = document.createElement(this.name);
    document.body.appendChild(elem);
    elem.setAttribute(this.attr_name, this.attr_value);
   }
 }
 class elementWithText extends element {
   constructor(name, text){
    super(name);
    this.text = text;
   }
   createNew(){
   var elem = document.createElement(this.name);
   document.body.appendChild(elem);
   elem.innerHTML = this.text;
  }
   setElementAttribute(attr_name, attr_value){
    super.setElementAttribute(attr_name, attr_value); 
  }
   createNewWithAttribute(){
    var elem = document.createElement(this.name);
    document.body.appendChild(elem);
    elem.setAttribute(this.attr_name, this.attr_value);
    elem.innerHTML = this.text;
  }
}
   var inputBox = new element('input');
   inputBox.setElementAttribute('type','radio');
   inputBox.createNewWithAttribute();
   var heading = new elementWithText('h1','Hello World');
   heading.setElementAttribute('style','color: red;');
   heading.createNewWithAttribute();
I don't suggest encapsulating such standard functionality in classes unless you are just playing around or learning.
I suggest renaming element to ElementFactory or ElementSpawner or something alike as it doesn't encapsulate a DOM element but creates and appends them. You then might want to return the created elements, too.
Also, what happens when you call createNewWithAttribute without previous call to setElementAttribute? Shouldn't you rather keep an internal map of attributes and make their addition optional via createNew(withAttributes = true) parameter?
Also, elem.innerHTML = this.text should probably be written as elem.textContent = this.text unless text means html in which case you should rename the class.
Don't mix CamelCase (elementWithText) with unser_scores (attr_value) and preferably capitalize class names.