How do I make numbered paragraphs (HTML5/CSS3)

后端 未结 3 491
囚心锁ツ
囚心锁ツ 2021-01-26 17:15

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

相关标签:
3条回答
  • 2021-01-26 17:34
    <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>
    
    0 讨论(0)
  • 2021-01-26 17:52

    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>
    
    0 讨论(0)
  • 2021-01-26 17:53

    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>

    0 讨论(0)
提交回复
热议问题