When <ul> is used inside <dl>, there is a question about the grammar check error.

Asked 1 years ago, Updated 1 years ago, 117 views

It says that I shouldn't use dl in ul, so what should I do in this case?

fast-frontend html dl validation syntax

2022-09-22 13:35

2 Answers

Hello, Heeyoung

I answer your question. ^ - ^

The following error is displayed in the grammar check because of the location of the close tag.

Error Element dl not allowed as child of element ul in this context.

.

"Shall we?" followed by a </li> closing tag, which is a grammar error caused by the <dl> element being marked as a child element of the <ul> element. Inside the <ul> element, only the <li> element is allowed as a child.

<ul>
  <!-- Incorrect position of closing tag -->
  <li>Q I made a Kakao Bank account, how should I make a deposit?</li>
  <dl>
    <dt>...</dt>
    <dd>...</dd>
  </dl>
</ul>

For the above code, </li> The position of the closing tag must be changed to resolve the grammar error as shown below.

<ul>
  <li>Q I made a Kakao Bank account, how should I make a deposit?
    <dl>
      <dt>...</dt>
      <dd>...</dd>
    </dl>
  </li> <!-- Move to this location -->
</ul>

It is inappropriate to use the <dl> element in the content "Transfer from my other bank account to Kakao Bank account..." The <dl> element is used to structure information data consisting of key:value pairs.

Questions about how to utilize <dl><dt>, <dd>, <div> within <dl> elements (D/code>)The use of the element is confusing.Read the answers in the article.

Please review the structure of the document you created before and review if the markup has been reflected considering the correct meaning. Watch the lecture again to see if you missed anything from the lecture you watched once, and try to reach a satisfactory result. ^ - ^

Heeyoung! The unyielding challenge becomes the seed of glory! I'm rooting for you to challenge yourself!


2022-09-22 13:35

Remove </li> from line 16 and paste it after line 24 </dl>. The <dl> object will then fall under <li>.

+ To add to that, you seem to be using <dl> tags as non-standard. <dt> is a tag designed to contain some defined 'definition term' and <dd> is a good way to answer one question, <dt> is a good way to answer it.


2022-09-22 13:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.