I am trying to make a list, for example, Element 1. birdElement 2. Lion...
The problem is that I do not want to write an "Element" for each element. Is there any way to add content to my list?
You need CSS counters :
#customlist { /* delete default counter */ list-style-type: none; /* create custom counter and set it to 0 */ counter-reset: elementcounter; } #customlist>li:before { /* print out "Element " followed by the current counter value */ content: "Element " counter(elementcounter) ": "; /* increment counter */ counter-increment: elementcounter; }
<ol id="customlist"> <li>Elephant</li> <li>Bird</li> <li>Lion</li> </ol>
Source: https://habr.com/ru/post/1203330/More articles:How can I restrict a transition in a workflow to only the user who created the work item in TFS? - tfsAdd custom text to the list- htmlOpenShift with Comodo SSL - sslLimiting an Assigned To column in a TFS work item from the same as Creator - tfs2010How to load custom cursor in Firemonkey? - delphihtml one page template for wordpress conversion - wordpressUnity RegisterType with unusual LifetimeManager behavior - c #ArcGIS GeoEvent Processor - javax.xml.ws.soap.SOAPFaultException: unsubscribe failed - javaImpregnated mass, INCLUDING DUPLICATE KEY UPDATE - phpChange state of React component from old external Javascript? - javascriptAll Articles