Week 1 Pre-class 1.1: HTML, CSS and Javascript
本页目录· 9 条
1. How the web works
请注意,HTML5 标签不区分大小写,但您应该始终使用小写。这是由于您将遵循的代码指南。本单元的后续部分将更详细地探讨该代码指南。
2. W3School—Good or bad?
W3Schools(W3Schools, n.d.) However, often experienced and seasoned developers will not use it as the go-to reference point. The reason is that previously w3schools has been known to have poor documentation and have many content errors and issues (this was back in 2011). They have improved since then, however, there might be still some issues. Some developers will find it quite obvious where the mistakes are.
One of the more famous resources to learn web development is W3Schools (W3Schools, n.d.) However, often experienced and seasoned developers will not use it as the go-to reference point. The reason is that previously w3schools has been known to have poor documentation and have many content errors and issues (this was back in 2011). They have improved since then, however, there might be still some issues. Some developers will find it quite obvious where the mistakes are.
学习 Web 开发最著名的资源之一是 W3Schools (W3Schools,nd)。然而,经验丰富的开发人员通常不会将其作为首选参考。原因是,W3Schools 之前以文档质量差、内容错误和问题多而闻名(这还是在 2011 年)。虽然他们现在已经有所改进,但可能仍然存在一些问题。有些开发人员会发现错误很明显。
对于初学者来说,w3schools 提供了相当不错的教程,能够提供良好的学习体验;然而,更全面的学习需要使用更可靠的资源,例如 Mozilla 开发者网络 (MDN) (MDN, 2023)。这将是您本单元的参考资料之一。如果可能,请避免使用 w3schools。
developer.mozilla.orgdeveloper.mozilla.org/en-USjsfiddle.netjsfiddle.net3. CSS: Styling the web
- CSS 不是编程语言,也不是标记语言,而是一种样式表语言。
Css selectors
Padding, border, margin? 填充、边框、边距?
关于 CSS 的一个重要概念是,页面上的元素可以被认为是一个个叠放在一起的盒子。
CSS 原理基于盒子模型。图中所示的每个盒子都具有如下属性:
- Margin: The space around the outside of the element.
边距:元素外部周围的空间。
- Border: The solid line that sits just outside the padding.
边框:位于填充外面的实线。
- Padding: The space around the outside of the element.
填充:元素外部周围的空间。
4. What is HTML5?
HTML5 是最新的 HTML5 标准,它代表了两个不同的概念。它是 HTML 语言的新版本,包含新的元素、属性和行为;它还拥有一套更强大的技术,可以构建更加多样化、更强大的网站和应用程序。
HTML5 technologies can be broken down into different groups:
- Semantics: This allows you to describe more precisely what your content is.
- Connectivity.
- Offline and storage.
- Multimedia.
- 2D/3D graphics.
- Performance and integration.
- Device access.
- Styling.
Semantic elements
HTML5 引入了语义元素。这使得我们能够使用标准语义来描述 Web 文档的结构。
Obsolete and deprecated elements 过时和弃用的元素
有一些旧的 HTML 元素已被弃用,不应再使用。您不应在新项目中使用它们,并且应尽快在旧项目中替换它们。
- <applet>
- <basefont>
- <bgsound>
- <big>
- <center>
- <command>
- <content>
- <font>
- <frame>
- <image>