您使用
吗?在你的 HTML 中?
使用
在 HTML5 中仍然有效,但您认为它在语义上是正确的并且是内容的一部分吗?
您在项目中使用它吗?
我发现每次添加我们需要转到 html 代码的
时都很困难。使用 hr
将演示与内容混合在一起。
Wordpress WYSIWYG 编辑器没有
按钮,因此如果我使用它,那么如果添加/删除/重新组织内容,非技术客户将无法添加它。
Use of <hr>
is still valid in HTML5 but do you think it's semantically correct and it's a part of content?
Are you using it in your projects?
I find it diffult when to add any <hr>
we need to go to html code every time. using hr
is mixing presentation with content.
Wordpress WYSIWYG editor doesn't have button for <hr>
so if i use it then non technical client would not be able to add it if the add/remove/re-organize content.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
是的 - 仍然使用它来分解长文本的部分 - 实际上不是为了其他任何事情。
如果在他们如此友善地结束您的问题后您仍然可以看到这一点 - 因为它实际上与 Wordpress 有关,而不是 HR 标签 - 这里有一个链接可能会帮助您解决问题。 (还有另一个我不知道的神秘 stackexchange。
https://wordpress.stackexchange.com/questions/6033/get-a-button-for-hr-in-the-editor
Yup - still use it for breaking up sections of long text - not for anything else really.
If you can still see this after they so kindly closed your question - as it's to do with Wordpress really and not HR tags - here's a link that might help you out of the problem. (and to yet another mystery stackexchange that I didn't know about.
https://wordpress.stackexchange.com/questions/6033/get-a-button-for-hr-in-the-editor
我最近再次使用它,只是因为很容易理解其他开发人员阅读您的代码时发生的情况:
它仍然比其他任何东西都更像是一种样式。如果你想严格地将样式与(语义)标记分开,你可以考虑使用 CSS 中的 border-bottom 之类的东西。
我认为可读性很重要,而且即使在 HTML5 中,它也能正常工作。
话虽如此,我几乎根本不使用它。
I've been using this once again lately, simply because it is easy to understand what's going on for another developer reading your code:
It still is definitely more of a styling than anything else. If you want to be strict about separating style from (semantic) markup you could think of using something like with a border-bottom in CSS for example.
I think readability counts and that it works fine the way it does, even in HTML5.
That being said, I barely use it at all.
是的,我认为在 html5 中使用
hr
是正确的,但仅在长文本中作为一种分页符。我永远不会使用hr
来划分页面的功能不同部分。对我来说,正确的用法是在 wiki 中,它主要基于文本,与最早的 html 页面非常相似。更重要的是,许多现代网站更喜欢较短的块甚至分页文本的设计,而
hr
标签似乎不再很有用。Yes, I think it's correct to use
hr
in html5, but only in long texts as a kind of page-break. I would never use anhr
to divide functionally different sections of the page.For me, a proper use would be in a wiki, which is primarily text based in much the same way as the earliest html pages were. It's more that many modern sites favor a design with shorter blocks or even paged text that
hr
tags don't seem very useful anymore.有趣的文章:http://html5doctor.com/small-hr-element/
但无论如何我都不用它。
Interesting article: http://html5doctor.com/small-hr-element/
but I don't use it anyway.
如果您的内容中的主题或主题发生了变化,并且尚未用其他语义标记(标题或新部分),我会使用它。
I'd use it if there is a shift in topic or theme in your content that isn't already being marked by something else semantically (Heading or a new section).