If you have not read previous posts of HTML then you can go here and read them for better understanding.
In today's post I will tell you about how to create list using HTML. There are three types of list :-
- Order List.
- Unordered List.
- Definition List.
Now see below steps to create these lists :-
- First open notepad or notepad++.
- We <ol> </ol> for order list, <ul> </ul> for unordered list and <dl> </dl> definition list.
- Inside we <ol> </ol> and <ul> </ul> we will use another tag named as <li> </li>.
- But in <dl> </dl> we will use <dt> </dt> and </dd> </dd> in place of <li> </li>.
- In <ol> </ol> and <ul> </ul> we write matter between <li> </li>.
- But in <dl> </dl> we write matter between <dt> </dt> and </dd> </dd>.
- Then write or copy and paste the below given HTML code.
- Now save it as anyname.html.
- Now run it in browser.
- After running it you will know the difference between these three list.
HTML Code :-
<html>
<head>
<title>Lists</title>
</head>
<body>
<h1>Order List</h1>
<ol>
<li>C</li>
<li>C++</li>
<li>JAVA</li>
</ol>
<h1>Unorder List</h1>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>ASP.NET</li>
</ul>
<h1>Defination List</h1>
<dl>
<dt>Programming Skills</dt>
<dd>C</dd>
<dd>C++</dd>
<dd>JAVA</dd>
</dl>
</body>
</html>
Output :-
For more help see the below video :-
0 comments:
Post a Comment