HTML 概述,帮助我
当我试图完全理解某些东西时,我会尝试通过分类、列表等方式将其形象化以掌握它。
现在,我想理解 HTML,它似乎是这样的: 它都是由标签组成的。 HTML 标签可以按其用途进行划分:
1)浏览器格式的标签,如“文章”、“部分”、“引用”等,它们不会添加任何视觉或对用户直接有用的内容,它们是为了帮助更好地管理网页。
2) 视觉格式标签,如“斜体”、“粗体”、“断线”等,它们仅用于提供视觉布局。
3) 互动标签,如链接、图片、音乐、视频。
4)功能标签,如输入表单、“菜单”、“选择”等,它们具有交互性和功能性用途。
这是对的吗?我错过了什么或混淆了什么吗? 有没有更好的方法来对它们进行分类? 提前致谢。
When i try to fully understand something i try to visualize in order to grasp it, by categorizing, listing etc etc.
Now, i wanna understand HTML, it seems that it goes something like this:
Its all made of tags.
HTML tags can be divided by their purpose:
1) Tags for Browser Format like "article", "section", "cite",etc, they dont add anything visual or at direct usefulness to the user, they are there to help better manage webpages.
2) Tags for Visual Format like "italics", "bold", "break line", etc they are used to only provide a visual layout.
3) Interactive Tags like links, pictures, music, video.
4) Functional Tags like input forms, "menu", "select" etc, they have interactive and functional uses.
Is this right? am i missing something or confused anything?
Is there a better way to categorize em?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你对这些类别的钱是正确的。现在,随着 HTML5 的出现,HTML 比以前更加混乱。在旧版本中,所有标签都“做了”一些事情。大多数情况下,它们代表了一种预定义的格式化方式。使用CSS3,所有这些预定义的标准都可以更改,并且任何标签都可以做任何事情。这就是为什么 HTML5 中引入的一些标签(例如文章、部分和引用)只是尝试组织页面上的信息,而将外观和感觉留给设计者/程序员(通过 CSS 和 Javascript)。毕竟,如果大多数人无论如何都会使用 CSS 来自定义它,那么定义它的外观就没有意义了。
然而,一些标签确实具有无法通过 CSS 更改的特定交互行为(例如视频)。但总的来说,我认为 HTML 正在慢慢发展为仅构建信息的标签,如 XML,并将所有格式留给 CSS,将所有交互留给 Javascript。
I think you are right on the money with those categories. HTML is more confusing now, with HTML5, than it used to be. In older versions, all tags "did" something. Mostly, they represented a predefined way of formatting things. With CSS3, all these predefined standards can be changed, and any tag can do anything. That's why some tags introduced in HTML5, like article, section and cite, merely try to organize information on the page, leaving the look and feel up to the designer/programmer (through CSS and Javascript). After all, there's no point on defining how will look like if most people will use CSS to customize it anyway.
A few tags, however, do have a specific interactive behavior that can't be changed with CSS (e.g. video). But in general, I would say HTML is slowly evolving towards tags that only structure the information, as in XML, and leave all formatting to CSS, and all interaction to Javascript.
它基本上是正确的,但有一些概念上的混乱。 HTML 实际上是由元素组成的,元素是文档树中的节点;标签只是指示元素的一种方式。此外,
article
这样的元素只是提议的 HTML5 元素,假设被视为指示含义和结构,但当前浏览器仅将其视为容器。cite
元素或多或少意味着斜体,尽管理论上它是语义的并且意味着引用。br
标签是有争议的;最好仅在内容本身包含换行符时使用(例如,邮政地址的行之间或诗的节之间)。HTML 4.01 规范 有一个有用的分类(第 9 至 18 节)。
It’s mostly right, with some conceptual confusion. HTML is really made of elements, which are nodes in a document tree; tags are just a way of indicating elements. Moreover,
article
are just proposed HTML5 elements, assumed to be treated as indicating meaning and structure, but taken just as containers by current browser. Thecite
element more or less means italics, though the theory is that it is semantic and means citation.br
tag is controversial; it is best used only when the content itself contains a line break (e.g., between lines of a postal address, or stanzas of a poem).The HTML 4.01 spec has a useful classification (sections 9 to 18).