Skip to content Skip to sidebar Skip to footer

How Do I Make Numbered Paragraphs (HTML5/CSS3)

I'm working on a QuickBASIC 4.5 guide in HTML5, and I've been getting a bunch of it working, but I want to know how I can number (or stop text-wrapping) my lines of code. For now,

Solution 1:

<p>Paragraph </p>
<p>Paragraph </p>
<p>Paragraph </p>
<p>Paragraph </p>
<p>Paragraph </p>
<p>Paragraph </p>

<style type="text/css">
body {
  counter-reset: section;      
}
p:before {
  counter-increment: section;        
  content: "" counter(section) ": "; 
}
</style>

Solution 2:

an <ol> element will work instead of a url. By default an <ol> shows the numbers of the list items as a pose to the <ul> element etc

<ol>
<li> PRINT "Hello World!" </li>
<li>INPUT "Who are you? ", myName</li>
</ol>

Solution 3:

You can do this using ordered list .

See this link http://www.w3schools.com/html/html_lists.asp.

<ol> <li><p>hello world </p></li> </ol>


Post a Comment for "How Do I Make Numbered Paragraphs (HTML5/CSS3)"