Creating a Definition list in HTML 5

Creating a Definition list in HTML 5

We can use a definition list in your document to define content in the format of a glossary or dictionary. Typically items in a definition list come in pairs with the first element being the term to be defined and the second being the definition. We use the <dl> tag to delimit your definition the <dt> tag to define our term and the <dd> tag to add your definitions. When displayed definitions are typically indented relative to the terms.

Create a Definition List

Step 1: Type <dl> above the text you want to set as a list

Step 2: Type <dt> in front of each term and </dt> after each term.

Step 3: Type <dd> in front of each definition and <dd> after each definition.

Step 4: Type </dt> after the list text.

Result Output

The text appears as a list on the web page.

<!DOCTYPE html>
<html>
    <Head>
        <Title>Coding thai</Title>
    </Head>
    <body>
        Type of Web Developer 
        <hr>
        <dl>
            <dt>Fontend Developer</dt>
                <dd> A front end developer has one general responsibility: to ensure that
                  website visitors can easily interact with the page.</dd>
            <dt>Backend Developer</dt>
                <dd>Back-end developers are the experts who build and maintain the mechanisms
                  that process data and perform actions on websites.</dd>
        </dl>
        <hr>
       <small>Copyright 2022 Codingthai</small>
    </body>
</html>

Follow us on Social Media For More

FacebookInstagramPinterest

Leave a Comment