Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typography: <u> should not be used to underline text in HTML5? #29584

Closed
florianlacreuse opened this issue Oct 24, 2019 · 2 comments
Closed

Typography: <u> should not be used to underline text in HTML5? #29584

florianlacreuse opened this issue Oct 24, 2019 · 2 comments

Comments

@florianlacreuse
Copy link
Contributor

According the the HTML5 specs and as explained here, <u> has been previously deprecated and reintroduced with a new meaning.

This element used to be called the "Underline" element in older versions of HTML, and is still sometimes misused in this way. To underline text, you should instead apply a style that includes the CSS text-decoration property set to underline.

However, the BS docs suggests to use <u> element to underline text as it's used to be in the past (as I understand it): https://getbootstrap.com/docs/4.3/content/typography/#inline-text-elements

One more thing, from this ressource from w3 about <b>, <i>, etc.:

The following HTML elements specify font information. Although they are not all deprecated, their use is discouraged in favor of style sheets.

May be BS should at least provide an utility class to underline text? We can already use .font-weight-bold instead of <b> and .font-italic instead of <i>.

@XhmikosR
Copy link
Member

XhmikosR commented Oct 25, 2019

Yeah, I think this would be a good addition. Personally I almost never have to use u, b or i

@XhmikosR
Copy link
Member

Fixed in #29604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants