CrazyEngineers
  • Ordered list in HTML (Problem)

    Updated: Oct 17, 2024
    Views: 1.0K
    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?
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Manish Goyal

    MemberJan 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>
    Are you sure? This action cannot be undone.
    Cancel
  • Mahesh Dahale

    MemberJan 8, 2010

    <html>
    <body>
    
    <h4>Numbered list:</h4>
    [list]
     [*]some text here
     [*]some text here
     [*]some text here
     [*]some text here
    [/list] 
    </body>
    </html>
    
    Are you sure? This action cannot be undone.
    Cancel
  • Sahithi Pallavi

    MemberJan 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?
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberJan 8, 2010

    Yes, the output should be

    Q1.
    Q2.

    instead of
    1.
    2.
    3.

    Exactly what Pallavi said.
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberJan 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
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberJan 8, 2010

    goyal420
    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
    Ya, I also think that there is no method for this.
    Are you sure? This action cannot be undone.
    Cancel
  • sookie

    MemberJan 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.

    😀
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberJan 9, 2010

    sookie
    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.

    😀
    Thanks for the suggestion sookie. Currently, I don't know CSS, but I'll consult somebody who knows CSS.
    Are you sure? This action cannot be undone.
    Cancel
  • wlegend

    MemberJan 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
    Are you sure? This action cannot be undone.
    Cancel
  • Prasad Ajinkya

    MemberJan 13, 2010

    Gaurav,
    Look up CSS, I think you can tweak the bullet points (<li> to prepend Q to it).
    Are you sure? This action cannot be undone.
    Cancel
  • gaurav.bhorkar

    MemberJan 13, 2010

    I think CSS is the only option to achieve such output.
    Are you sure? This action cannot be undone.
    Cancel
  • apple6

    MemberJul 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
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register