Display x of more than x lines in <div> block(s) on html page randomly |
Display x of more than x lines in <div> block(s) on html page randomly |
JeanK |
Jul 26 2021, 05:10 AM
Post
#1
|
Group: Members Posts: 1 Joined: 26-July 21 Member No.: 28,023 |
I have two DIV Blocks with always more than 5 Lines of text per DIV Block.
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <style> body { background: #2196f3; color: #ffffff; } .div1 { background-color: #2196f3; } .div2 { background-color: #2196f3; } </style> </head> <body> <div class="w3-container w3-center w3-padding"> <b>DIV1</b> <div class="div1"> <p>Div Text1.1</p> <p>Div Text1.2</p> <p>Div Text1.3</p> <p>Div Text1.4</p> <p>Div Text1.5</p> <p>Div Text1.6</p> <p>Div Text1.7</p> <p>Div Text1.8</p> <p>Div Text1.9</p> </div> <div class="w3-container w3-center w3-padding"> <b>DIV2</b> <div class="div2"> <p>Div Text2.1</p> <p>Div Text2.2</p> <p>Div Text2.3</p> <p>Div Text2.4</p> <p>Div Text2.5</p> <p>Div Text2.6</p> <p>Div Text2.7</p> <p>Div Text2.8</p> <p>Div Text2.9</p> </div> </body> </html> HOW can I shuffle the lines in both DIV bLocks that every time browser is reloaded 5 different from x Lines are displayed on screen? Refresh/Reload browser <div class="w3-container w3-center w3-padding"> <b>DIV1</b> <div class="div1"> <p>Div Text1.1</p> <p>Div Text1.2</p> <p>Div Text1.4</p> <p>Div Text1.6</p> <p>Div Text1.7</p> </div> <div class="w3-container w3-center w3-padding"> <b>DIV2</b> <div class="div2"> <p>Div Text2.3</p> <p>Div Text2.4</p> <p>Div Text2.6</p> <p>Div Text2.7</p> <p>Div Text2.9</p> </div> ... and so on. Is there a script for this? P.S. I`m not a coder. I have no knowledge about this. It would be very helpful if someone could provide me with a working solution. |
Lo-Fi Version | Time is now: 26th September 2024 - 12:41 AM |