JSFiddle - React, Tailwind, and code Playground

by Hashem Qolami

HTML

<input type="text" id="testCase" />

<p>
    <span>Default Display type:</span>
    <span id="result"></span>
</p>

CSS

span {
    color: #666;
    vertical-align: middle;
}

#result {
    color: red;
    font-size: 1.4em;
    font-weight: bold;
    margin-left: .3em;
}

JavaScript

var input = document.getElementById("testCase");
document.getElementById("result").innerHTML = getComputedStyle(input).getPropertyValue("display");