Here is the code snippet that I am working with:
<div id="page1-div" style="position:relative;width:1347px;height:1189px;">
<img width="1347" height="1189" src="target001.png" alt="background image" />
<p style="position:absolute;top:218px;left:209px;white-space:nowrap" class="ft10">Mario</p>
<p style="position:absolute;top:218px;left:263px;white-space:nowrap" class="ft10">Lopez</p>
<p style="position:absolute;top:218px;left:827px;white-space:nowrap" class="ft10">18987456O</p>
<p style="position:absolute;top:395px;left:183px;white-space:nowrap" class="ft10">25</p>
<p style="position:absolute;top:395px;left:402px;white-space:nowrap" class="ft10">Fisica y Química</p>
<p style="position:absolute;top:433px;left:298px;white-space:nowrap" class="ft10">Ninguna</p>
<p style="position:absolute;top:502px;left:633px;white-space:nowrap" class="ft10">230</p>
</div>
<div id="page2-div" style="position:relative;width:1347px;height:1189px;">
<img width="1347" height="1189" src="target002.png" alt="background image" />
<p style="position:absolute;top:149px;left:300px;white-space:nowrap" class="ft20">25</p>
<p style="position:absolute;top:149px;left:565px;white-space:nowrap" class="ft20">Fisica y Química</p>
<p style="position:absolute;top:149px;left:984px;white-space:nowrap" class="ft20">fevev</p>
<p style="position:absolute;top:172px;left:425px;white-space:nowrap" class="ft20">fevevvvev</p>
<p style="position:absolute;top:172px;left:912px;white-space:nowrap" class="ft20">Juan Soler</p>
<p style="position:absolute;top:195px;left:319px;white-space:nowrap" class="ft20">Ana Abarca</p>
<p style="position:absolute;top:195px;left:981px;white-space:nowrap" class="ft20">9:30-14:30</p>
</div>
I am seeking a solution to assign unique ID attributes (or modify the class attribute values) for all p elements within both divs. This will allow me to customize their styles in a CSS file. However, I am unsure of the proper method to access these p elements residing inside the two div sections.