Definition or un/ordered list?
I'm in doubt whether this is a definition list or an un/ordered list. I would say an un/ordered list but on the other side, it could be a definition list with the product name as a key and the price as a value.
Does anyone know which I should choose if you're looking at the sematics?
<dl>
<dt>Product name 1</dt>
<dd>price</dd>
<dt>Product name 2</dt>
<dd>price</dd>
</dl>
Or
<ol>
<li>
<span>Product name 1</span>
<span>price</span>
</li>
<li>
<span>Product name 2</span>
<span>price</span>
</li>
</ol>
html semantic-markup
add a comment |
I'm in doubt whether this is a definition list or an un/ordered list. I would say an un/ordered list but on the other side, it could be a definition list with the product name as a key and the price as a value.
Does anyone know which I should choose if you're looking at the sematics?
<dl>
<dt>Product name 1</dt>
<dd>price</dd>
<dt>Product name 2</dt>
<dd>price</dd>
</dl>
Or
<ol>
<li>
<span>Product name 1</span>
<span>price</span>
</li>
<li>
<span>Product name 2</span>
<span>price</span>
</li>
</ol>
html semantic-markup
What’s the context here? It doesn’t appear to be a list of products (like in a web shop), right? Is name and price the only data about each product? Are the names linked?
– unor
Nov 19 '18 at 16:23
1
It is a shopping basket of a hotel. It contains the name of the room and its price. It can also contain upsell, such as breakfast for example. It will then probably look like this: <dl> <dt>Comfort room</dt> <dd> € 100,00 <dl> <dt>Breakfast</dt> <dd>€ 15,00<dd> <dt>Mini-bar</dt> <dd>€ 10,00<dd> </dl> </dd> </dl>
– Fleur de Kroon
Nov 20 '18 at 7:36
add a comment |
I'm in doubt whether this is a definition list or an un/ordered list. I would say an un/ordered list but on the other side, it could be a definition list with the product name as a key and the price as a value.
Does anyone know which I should choose if you're looking at the sematics?
<dl>
<dt>Product name 1</dt>
<dd>price</dd>
<dt>Product name 2</dt>
<dd>price</dd>
</dl>
Or
<ol>
<li>
<span>Product name 1</span>
<span>price</span>
</li>
<li>
<span>Product name 2</span>
<span>price</span>
</li>
</ol>
html semantic-markup
I'm in doubt whether this is a definition list or an un/ordered list. I would say an un/ordered list but on the other side, it could be a definition list with the product name as a key and the price as a value.
Does anyone know which I should choose if you're looking at the sematics?
<dl>
<dt>Product name 1</dt>
<dd>price</dd>
<dt>Product name 2</dt>
<dd>price</dd>
</dl>
Or
<ol>
<li>
<span>Product name 1</span>
<span>price</span>
</li>
<li>
<span>Product name 2</span>
<span>price</span>
</li>
</ol>
html semantic-markup
html semantic-markup
edited Nov 19 '18 at 8:18
JJJ
29k147591
29k147591
asked Nov 19 '18 at 7:52
Fleur de KroonFleur de Kroon
11
11
What’s the context here? It doesn’t appear to be a list of products (like in a web shop), right? Is name and price the only data about each product? Are the names linked?
– unor
Nov 19 '18 at 16:23
1
It is a shopping basket of a hotel. It contains the name of the room and its price. It can also contain upsell, such as breakfast for example. It will then probably look like this: <dl> <dt>Comfort room</dt> <dd> € 100,00 <dl> <dt>Breakfast</dt> <dd>€ 15,00<dd> <dt>Mini-bar</dt> <dd>€ 10,00<dd> </dl> </dd> </dl>
– Fleur de Kroon
Nov 20 '18 at 7:36
add a comment |
What’s the context here? It doesn’t appear to be a list of products (like in a web shop), right? Is name and price the only data about each product? Are the names linked?
– unor
Nov 19 '18 at 16:23
1
It is a shopping basket of a hotel. It contains the name of the room and its price. It can also contain upsell, such as breakfast for example. It will then probably look like this: <dl> <dt>Comfort room</dt> <dd> € 100,00 <dl> <dt>Breakfast</dt> <dd>€ 15,00<dd> <dt>Mini-bar</dt> <dd>€ 10,00<dd> </dl> </dd> </dl>
– Fleur de Kroon
Nov 20 '18 at 7:36
What’s the context here? It doesn’t appear to be a list of products (like in a web shop), right? Is name and price the only data about each product? Are the names linked?
– unor
Nov 19 '18 at 16:23
What’s the context here? It doesn’t appear to be a list of products (like in a web shop), right? Is name and price the only data about each product? Are the names linked?
– unor
Nov 19 '18 at 16:23
1
1
It is a shopping basket of a hotel. It contains the name of the room and its price. It can also contain upsell, such as breakfast for example. It will then probably look like this: <dl> <dt>Comfort room</dt> <dd> € 100,00 <dl> <dt>Breakfast</dt> <dd>€ 15,00<dd> <dt>Mini-bar</dt> <dd>€ 10,00<dd> </dl> </dd> </dl>
– Fleur de Kroon
Nov 20 '18 at 7:36
It is a shopping basket of a hotel. It contains the name of the room and its price. It can also contain upsell, such as breakfast for example. It will then probably look like this: <dl> <dt>Comfort room</dt> <dd> € 100,00 <dl> <dt>Breakfast</dt> <dd>€ 15,00<dd> <dt>Mini-bar</dt> <dd>€ 10,00<dd> </dl> </dd> </dl>
– Fleur de Kroon
Nov 20 '18 at 7:36
add a comment |
1 Answer
1
active
oldest
votes
From MDN:
The HTML
<dl>
element represents a description list. The element
encloses a list of groups of terms (specified using the element)
and descriptions (provided by elements). Common uses for this
element are to implement a glossary or to display metadata (a list
of key-value pairs).
Looking at the semantics you should use <dl>
, but from my experience I'm telling you to choose whichever you feel most comfortable with!
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53370393%2fdefinition-or-un-ordered-list%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
From MDN:
The HTML
<dl>
element represents a description list. The element
encloses a list of groups of terms (specified using the element)
and descriptions (provided by elements). Common uses for this
element are to implement a glossary or to display metadata (a list
of key-value pairs).
Looking at the semantics you should use <dl>
, but from my experience I'm telling you to choose whichever you feel most comfortable with!
add a comment |
From MDN:
The HTML
<dl>
element represents a description list. The element
encloses a list of groups of terms (specified using the element)
and descriptions (provided by elements). Common uses for this
element are to implement a glossary or to display metadata (a list
of key-value pairs).
Looking at the semantics you should use <dl>
, but from my experience I'm telling you to choose whichever you feel most comfortable with!
add a comment |
From MDN:
The HTML
<dl>
element represents a description list. The element
encloses a list of groups of terms (specified using the element)
and descriptions (provided by elements). Common uses for this
element are to implement a glossary or to display metadata (a list
of key-value pairs).
Looking at the semantics you should use <dl>
, but from my experience I'm telling you to choose whichever you feel most comfortable with!
From MDN:
The HTML
<dl>
element represents a description list. The element
encloses a list of groups of terms (specified using the element)
and descriptions (provided by elements). Common uses for this
element are to implement a glossary or to display metadata (a list
of key-value pairs).
Looking at the semantics you should use <dl>
, but from my experience I'm telling you to choose whichever you feel most comfortable with!
edited Nov 19 '18 at 10:15
Liam
16.1k1676128
16.1k1676128
answered Nov 19 '18 at 8:27
StundjiStundji
442212
442212
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53370393%2fdefinition-or-un-ordered-list%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What’s the context here? It doesn’t appear to be a list of products (like in a web shop), right? Is name and price the only data about each product? Are the names linked?
– unor
Nov 19 '18 at 16:23
1
It is a shopping basket of a hotel. It contains the name of the room and its price. It can also contain upsell, such as breakfast for example. It will then probably look like this: <dl> <dt>Comfort room</dt> <dd> € 100,00 <dl> <dt>Breakfast</dt> <dd>€ 15,00<dd> <dt>Mini-bar</dt> <dd>€ 10,00<dd> </dl> </dd> </dl>
– Fleur de Kroon
Nov 20 '18 at 7:36