Ordered list in HTML (Problem)

gaurav.bhorkar
@gauravbhorkar-Pf9kZD โ€ข Oct 17, 2024

The output should be like:

Q1. some text here
Q2. some text here
Q3. some text here
Q4. some text here
Q5. some text here

Can this be done using an ordered list in HTML?
Or is there any other method in HTML?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Manish Goyal

    @manish-r2Hoep • Jan 8, 2010

    Gaurav I don't think that you can display text with help of
    ordered list tag
    You can use this
    Q1&nbsp some TEXT HERE<BR>
    Q2&nbsp some text here<br>

  • Mahesh Dahale

    @mahesh-E2tZ3t • Jan 8, 2010

    <html>
    <body>
    
    <h4>Numbered list:</h4>
    [list]
     [*]some text here
     [*]some text here
     [*]some text here
     [*]some text here
    [/list] 
    </body>
    </html>
    
  • Sahithi Pallavi

    @sahithi-oJZaYj • Jan 8, 2010

    @ mahesh : I think your code prints like this.

    Numbered list :

    1. some text here
    2. some text here
    3. some text here
    4. some text here

    But, Gaurav asked to print Q1,Q2,...
    Is it possible to print like that?

  • gaurav.bhorkar

    @gauravbhorkar-Pf9kZD • Jan 8, 2010

    Yes, the output should be

    Q1.
    Q2.

    instead of
    1.
    2.
    3.

    Exactly what Pallavi said.

  • Manish Goyal

    @manish-r2Hoep • Jan 8, 2010

    hey Gaurav use like this

    Q1.&nbsp some text<br>
    Q2.&nbsp some text<br>
    

    Otherwise I don't think that there will be any other method

  • gaurav.bhorkar

    @gauravbhorkar-Pf9kZD • Jan 8, 2010

    goyal420hey Gaurav use like this
    Q1.&nbsp some text<br>
    Q2.&nbsp some text<br>
    
    Otherwise I don't think that there will be any other method

    Ya, I also think that there is no method for this.

  • sookie

    @sookie-T06sFW • Jan 9, 2010

    Well, if you want to do purely in HTML then it provides following kind of numbering in <li> tag

    • arabic numbers
    • lower alpha
    • upper alpha
    • lower roman
    • upper roman


    but if usage of style is allowed then using CSS it can be done so. Just give it a try.

    ๐Ÿ˜€

  • gaurav.bhorkar

    @gauravbhorkar-Pf9kZD • Jan 9, 2010

    sookieWell, if you want to do purely in HTML then it provides following kind of numbering in <li> tag

    • arabic numbers
    • lower alpha
    • upper alpha
    • lower roman
    • upper roman

    but if usage of style is allowed then using CSS it can be done so. Just give it a try.

    ๐Ÿ˜€

    Thanks for the suggestion sookie. Currently, I don't know CSS, but I'll consult somebody who knows CSS.

  • wlegend

    @wlegend-cAOuVB • Jan 11, 2010

    Hello,
    I suggest that you use break lines or a table with 0 in border to give a more organised text with ability to use effects, by the way , why you don't use an editor like dreamweaver and do what you wanna do in the design mode like you r doing in Microsoft word.
    good luck

  • Prasad Ajinkya

    @prasad-aSUfhP • Jan 13, 2010

    Gaurav,
    Look up CSS, I think you can tweak the bullet points (<li> to prepend Q to it).

  • gaurav.bhorkar

    @gauravbhorkar-Pf9kZD • Jan 13, 2010

    I think CSS is the only option to achieve such output.

  • apple6

    @apple6-xCqSyW • Jul 30, 2012

    The following code explains about the ordered list in HTML. The list items are specified using the tag [*].And, the list items tag i.e, <li> is enclosed in the tag

    • .
      <html>
      <body>
       
      <h1>Sample Numbered list:</h1>
      <ol>
      <li>Hai!
      [*]How
      [*]are
      [*]you
      [/list]
      </body>
      </html>
      Output:
      Sample Numbered list:
      1. Hai!
      2. How
      3. are
      4. you