Questions tagged [semantic-markup]
Semantic Markup is using specific elements based on their intended meaning, as well as separating content from presentation, in HTML, Use this tag for questions about using semantic markup in HTML.
semantic-markup
1,023
questions
0
votes
1
answer
57
views
What HTML semantics should I use to make the output of a custom calculator accessible?
I'm developing a simple calculator tool. Right now, I'm using an <input> element with the readonly attribute to style the result of the calculation. However, while I think that this produces ...
0
votes
1
answer
36
views
How to properly "skip" a heading level when it is implicitly conveyed by page layout [closed]
Sometimes, semantics is contained within design. My question is how to translate this semantics into HTML when some levels of the heading hierarchy are skipped because they are implicit.
For example, ...
0
votes
0
answers
15
views
In HTML, is it semantically correct to include multiple dfn and abbr tags inside a summary tag and details tag?
Is this semantically correct code?:
<details>
<summary>The <dfn><abbr title="HyperText Markup Language">HTML</abbr></dfn> - the HyperText Markup ...
0
votes
1
answer
24
views
Should input element be inside form or not?
So I've got a component in react whose purpose is: the user writes a word into an input and presses enter or clicks a link to a go to that word's definition page.
'use client';
import { ...
0
votes
1
answer
48
views
Can I use href and rel attributes in img tag in HTML5?
In this article https://alistapart.com/article/introduction-to-rdfa/#section9 the author says that i can use the href and rel attributes directly inside img tag. I never knew we can do it in html5. ...
-2
votes
3
answers
124
views
javascript removing element style after clicking other
I'm trying to remove attribute "selected" from span element when other span element (not the same div) is clicked
and
How to remove attribute "selected" of span element in ...
5
votes
2
answers
68
views
HTML5 Section or Article
Let's say I have this part of my website (project to make a webshop):
<section id="GraphicsCards">
<h2>Graphics Cards</h2>
<section>
<...
0
votes
1
answer
58
views
Semantic use of <dl>, <dt>, <dd> for a price breakdown, or on list of items in a checkout
Is correct (in the sense of semantic HTML) to use the <dl>, <dt>, <dd> tags to:
Show a price breakdown in a checkout page? Like the ones which show Subtotal, Taxes and Total.
To ...
0
votes
0
answers
46
views
Can you nest the <menu> tag? semantic HTML
Is it okay to nest the <menu> tag?
eg:
<menu>
<li>1</li>
<li>2
<menu>
<li>2.1</li>
<li>2.1</li>
</menu>
&...
0
votes
2
answers
34
views
How to semantically mark up a nav with sections, where section headers aren't clickable
Imagine a navigation element, which is not the primary navigation on the site, but which navigates you to the several pages of an area on the site. Those pages are grouped into categories.
Every page ...
1
vote
1
answer
64
views
when using a <cite> tag, is it semantically valid to include both an episode/chapter and the source work?
This isn't really a problem per se, but I was curious and I couldn't find anyone talking about it online.
When it comes to use of the cite tag, I understand it's meant to be only for the title of a ...
1
vote
1
answer
52
views
Is this proper semantic html?
I'm making a component for a website where I need to make a checklist with the different W3C guidelines. I currently use a form as a parent element with an article and different details/summary ...
2
votes
1
answer
66
views
When writing one sentence per line and wanting space between lines but one semantic paragraph, should I use <br> or <p>?
I'm writing long-form copy on a sales page with this sort of style (shortened for brevity):
We get it…
Finding an X that understands X is difficult.
It seems like they all X.
So, how are you supposed ...
2
votes
1
answer
59
views
Why does <main> not define the scope of <header> and <footer>?
While going through the HTML standard's definition for sectioning content, it says that such elements define the scope of <header> and <footer> and that they can only be <article>, &...
0
votes
0
answers
38
views
Is this nesting of HTML elements invalid or semantically incorrect? main > section > header > h1 [duplicate]
I submitted a solution on a front-end component and I was told that the header should not have H1s within it, that it is a landmark outside the main tag and it has a "banner" role meaning it ...