I have a website that I created just to test my CSS, JS and PHP skills. I have written data in simple HTML tags. Now I heard about Microdata, RDFa and JSON-LD. And Google recommends using JSON-LD for structured data whenever possible.
So I just want to ask, in Schema.org Microdata format, they tell to add various attributes to the HTML tags which can be done simply by putting attributes in my already written HTML tags. But If I want to use JSON-LD as Google recommends, how am I supposed to do that?
Should I have to rewrite my whole content by removing it from HTML tags and write it in script
format (as defined in JSON-LD)?
For example, the image below contains the output of the code I wrote in simple HTML tags with their properties in CSS followed by a snippet of codes for this.
<h2>Timing</h2>
<p><?php echo $Timing; ?></p>
</div>
<div class="site-info">
<h2>Days</h2>
<p><?php echo $OpeningDays; ?></p>
</div>
<div class="site-info">
<h2>Bus Stand</h2>
<p><?php echo $BusStandName; ?></p>
</div>
<div class="site-info">
<h2>Bus Numbers</h2>
<p><?php echo $BusNumbers; ?></p>
</div>
<div class="site-info">
<h2>Tariff</h2>
<p><?php echo $Fees; ?></p>
</div>
So how now I have to edit my code (given for example) to make it structured data in JSON-LD without affecting the actual design of the page?