What is the code to write bulleted and numbered list in HTML.

 Posted by Poster on 3/31/2009 | Category: HTML 5 Interview questions | Views: 5835
Answer:

To write bulleted list in the HTML, write following code:

<ul>

<li>fdasfadsf asdf</li>
<li>sfdafasdf</li>
<li>fdsafasfsa</li>
<li>fdsafsda</li>
</ul>


To write numbered list in the HTML, write following code:
<ol>

<li>fdasfadsf asdf</li>
<li>sfdafasdf</li>
<li>fdsafasfsa</li>
<li>fdsafsda</li>
</ol>


Notice the difference is only <ul> and <ol>. In the bulleted list, we need to use <ul> tag and in the numbered list we need to use <ol> tag.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response