Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39932 > unrolled thread
| Started by | "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> |
|---|---|
| First post | 2023-03-15 11:29 -0700 |
| Last post | 2023-03-15 16:04 -0400 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.java.programmer
html style "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2023-03-15 11:29 -0700
Re: html style Arne Vajhøj <arne@vajhoej.dk> - 2023-03-15 16:04 -0400
| From | "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> |
|---|---|
| Date | 2023-03-15 11:29 -0700 |
| Subject | html style |
| Message-ID | <d968b927-09de-4e98-818b-0a834ad8038cn@googlegroups.com> |
Granted this has nothing to do with Java, other than the warning in eclipse on my jsp, but I wanted to get some opinions. What is best for writing html styling these days? I got a warning on a <u> tag stating it's deprecated. The browser converts this to style="text-decoration: underline;". There is no replacement tag to do the same thing. The old <i> tag converts to style="font-style: italic;". The <em> tag does the exact same thing. The old <b> tag converts to style="font-weight: bold;". The <strong> tag does the exact same thing. The <i> and <b> tags aren't giving warnings, just code smells. Apparently the team responsible for maintaining html definitions decided emphasis was clearer than italic and strong was clearer than bold, though they serve the same function, and literally nothing on the web needs to be underlined anymore aside from <a> tag. They still use the <u> tag on this doc page: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey Whether you agree with the html team or not, replacing all <i> and <b> references with <em> and <strong> seems trivial, but with the only drop in replacement for <u> being a style property, do we even bother writing <em> and <strong> or literally put everything in another tag such as <div> or <span> and do all of these with css classes? One use case I found in <u> for an application I'm maintaining was documentation, for emphasis, such as "... <u>new</u> records...". While it does make sense to me to change that to <em> (or is that a strong?), we can't change it if the customer prefers underlining.
[toc] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2023-03-15 16:04 -0400 |
| Message-ID | <tut8bv$11ddk$1@dont-email.me> |
| In reply to | #39932 |
On 3/15/2023 2:29 PM, e.d.pro...@gmail.com wrote: > Granted this has nothing to do with Java, other than the warning in > eclipse on my jsp, but I wanted to get some opinions. What is best > for writing html styling these days? I got a warning on a <u> tag > stating it's deprecated. The browser converts this to > style="text-decoration: underline;". There is no replacement tag to > do the same thing. The old <i> tag converts to style="font-style: > italic;". The <em> tag does the exact same thing. The old <b> tag > converts to style="font-weight: bold;". The <strong> tag does the > exact same thing. The <i> and <b> tags aren't giving warnings, just > code smells. Apparently the team responsible for maintaining html > definitions decided emphasis was clearer than italic and strong was > clearer than bold, though they serve the same function, and literally > nothing on the web needs to be underlined anymore aside from <a> > tag. They still use the <u> tag on this doc page: > https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey > > Whether you agree with the html team or not, replacing all <i> and > <b> references with <em> and <strong> seems trivial, but with the > only drop in replacement for <u> being a style property, do we even > bother writing <em> and <strong> or literally put everything in > another tag such as <div> or <span> and do all of these with css > classes? > > One use case I found in <u> for an application I'm maintaining was > documentation, for emphasis, such as "... <u>new</u> records...". > While it does make sense to me to change that to <em> (or is that a > strong?), we can't change it if the customer prefers underlining. My opinion: - stay away from all of these old tags - use div, p and span with class - let the visual designers do the CSS that define what those classes do Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web