HTML lists introduction in hindi

HTML lists

HTML lists का उपयोग information को specified oder lists में display (show) करने के लिए किया जाता है| जैसे की सभी lists में एक से ज्यादा list item defind element होते है|

Three types of HTML lists

  • Order list or Numbered list ( ol )
  • Unorder list or bulleted list ( ul )
  • Description list or Definition list ( dl )

Oder list or Numbered list (ol)

HTML ordered lists में list item के साथ numbers sequesce by default सेट होता है| इसलिए numberes list कहते है, Html odered list <ol> के साथ start होता है और </ol>के साथ close होता है|order list के अंदर  list item <li> के साथ start होता है और </li> close होता है|

<!DOCTYPE html>
<html lang="en">
<head>
<title>document demo</title>
</head>
<body>
<h2>HTML list item</h2>
<ol>
   <li>php</li>
   <li>css</li>
   <li>jquery</li>
   <li>ajax</li>
  <li>wordpress</li>
</ol>
</body>
</html>

output

  1. PHP
  2. CSS
  3. jquery
  4. ajax
  5. WordPress

Unordered list or bulleted list (ul)

HTML unordered में list item के साथ by default bullet सेट होते है| इसलिए उसे bullet list बी कहते है|Html unordered list <ul> के साथ start होता है और </ul>के साथ close होता है|unorder list के अंदर  list item <li> के साथ start होता है और </li> close होता है|

<!DOCTYPE html>
<html lang="en">
<head>
<title>document demo</title>
</head>
<body>
<h2>HTML list item</h2>
<ul>
   <li>php</li>
   <li>css</li>
   <li>jquery</li>
   <li>ajax</li>
  <li>wordpress</li>
</ul>
</body>
</html>

output

  • PHP
  • CSS
  • jquery
  • ajax
  • WordPress

Description list or Definition list (dl)

HTML Description list में list item के साथ description or definition होता है|Description lists <dl> के start होता है और </dl>के साथ close होता है|

<dl>element में <dt>element, item का term specified करता है और <dd> element, item term की defination specified करता है|

<!DOCTYPE html>
<html lang="en">
<head>
<title>document demo</title>
</head>
<body>
<h2>HTML list item</h2>
<dl>
   <dt>HTML</dt>
    <dd>HTML use to create webpage</dd>
    <dt>CSS</dt>
    <dd>CSS use for design</dd>
    <dt>PHP</dt>
    <dd>PHP use to create dynamic webpage</dd>
</dl>
</body>
</html>

output

HTML
HTML use to create webpage
CSS
CSS use for design
PHP
PHP use to create dynamic webpage

Nested Lists

Lists के अंदर दूसरे list formate का उपयोग करने को हम nested lists बोल सकते है|
जैसे की bulleted list को numbere list के अंदर में उपयोग करने को Nested lists कह सकते है|

<!DOCTYPE html>
<html lang="en">
<head>
<title>document demo</title>
</head>
<body>
<h2>HTML list item</h2>
<ul>
 </li>
   <dl>
      <dt>HTML</dt>
      <dd>HTML use to create webpage</dd>
      <dt>CSS</dt>
      <dd>CSS use for design</dd>
      <dt>PHP</dt>
      <dd>PHP use to create dynamic webpage</dd>
    </dl>
  </li>
  <li>
     <ol>
        <li>wordpress</li>
        <li>php</li>
     </ol>
     <ul>
        <li>wordpress</li>
        <li>php</li>
     </ul>
   </li>
</ul>
</body>
</html>

output

HTML
HTML use to create webpage
CSS
CSS use for design
PHP
PHP use to create dynamic webpage
    1. wordpress
    2. php
    • wordpress
    • php

Leave a Comment

Your email address will not be published. Required fields are marked *