Scope of Definition Lists in HTML:
Scope of Definition Lists HTML: These are unlike Ordered and Unordered lists because they are meant to define a term or phrase e.g. dictionary style of describing words and their possible usages. Therefore, definition lists are useful in HTML webpages where pairs of data exists i.e. one item explains another item related to it. Definition lists don’t use bullets or numbers against items. They segregate the definition terms and definition descriptions by indentation and line break. Let us make below definition list in HTML:
You may note that there are found terms which have been described with indentation and line break. Let us understand what these are.
Here “USA” is a definition term represented with <dt> while Definition Description is coded as <dd>.
The code to create a definition list in HTML is pretty simple. Let us develop a definition list step by step:
Step 1: Begin with the basic code of definition list i.e.
Step 2: Then begin placing your definition terms and their definition descriptions:
<dd> A federation of states in the American Continent that wields the strongest influence on the world.</dd>
Step 3: Check the result of above code in your browser:
Step 4: Keep on adding more definition terms and their corresponding descriptions. The HTML would produce and automatically indented outlook of the presented data.
Final HTML code for Definition lists:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<h1>Definition lists and their scope in HTML</h1>
<h2>Strongest Countries in the World</h2>
A federation of states in the American Continent that wields the strongest influence on the world.
A Russian communist state that is that spreas across Europe and Asia. In the previous 3 decades it has weakened, yet it is still a powerful country</dd>