没有合适的资源?快使用搜索试试~ 我知道了~
首页HTML5与CSS3实战指南:打造现代网站基石
"《Foundation HTML5 with CSS3: A Modern Guide and Reference》是一本面向网页开发者的重要参考资料,它专注于HTML5和CSS3的最新版本,这两者是构建网站的核心语言。本书旨在帮助读者掌握这两种技术的坚实基础,通过实践例子讲解如何正确地使用HTML5进行数据结构化,以及利用CSS3进行样式和布局设计。 HTML5的重要性在于它是当前最常用的语言,提供了丰富的功能,如离线存储、多媒体集成和更好的语义化标签,使得创建网站更加高效且符合标准。书中强调了代码和技术的合规性,确保你的网页能在主流浏览器中正常工作,对残疾用户友好,搜索引擎易于索引,并保持较小的文件大小。 即使你已经对HTML5和CSS3有所了解,这本书仍然有价值,因为它提供了详尽的参考表格,便于查找棘手的属性、代码和特性。作者在第一章"Getting Started"中引导读者从互联网和万维网的基础概念入手,为后续章节的学习奠定了基础,即使是经验丰富的网络开发者,也能从中获得新的视角和技巧更新。 章节安排包括从入门级的HTML和CSS基础知识,到构建内容、嵌入媒体、链接网络、创建表格、组装表单和应用程序,再到CSS3下的页面布局和整合所有元素。这是一本实用的现代指南,无论你是初学者还是寻求进阶的开发者,都能从中受益匪浅。最后,书后的索引帮助读者快速查找所需信息,确保高效学习和查阅。"
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/10571187/bg10.jpg)
Getting Started
13
Figure 1-2. The W3C Markup Validation Service
The W3C validator can automatically analyze your markup and display any errors it encounters so you can
correct them. It will also display validation warnings, which are simply cautions about issues you might
want to address but are not quite as severe as errors; warnings can be ignored if you have good reason to
do so, but errors are flaws that really must be fixed. When no errors are found, you’ll see a joyful banner
declaring that your document is valid. A document that is valid and correctly assembled according to the
rules of the language is said to be well-formed. Other validation tools are also available—both online and
offline—that can help you check your documents.
CSS also needs to be authored in accordance with the specifications, and the W3C offers a similar CSS
validation service (http://jigsaw.w3.org/css-validator/) to check your CSS files for problems.
Most web browsers are still able to interpret and render invalid documents, but only because they’ve been
designed to compensate for minor errors. Valid, well-formed documents are much more stable, and you
won’t have to depend on a browser’s built-in error handling to display them correctly.
![](https://csdnimg.cn/release/download_crawler_static/10571187/bg11.jpg)
Chapter 1
14
Hosting Your Web Site
You can save all of your work locally on your own computer, but when it’s time to make it available to the
World Wide Web, you need to move those files to a web server. You have a few hosting options if you’re
building your own website:
Using web space provided by your ISP: An Internet service provider (ISP) is the company that
connects you to the Internet. Many service providers offer a limited amount of web space where
you can host your own site. Ask your ISP whether web space is included with your service
contract and how you can use it.
Using free web space: Many companies provide free web hosting, though “free” is a relative term
because free web hosts are usually supplemented by advertising. If you’re not bothered by such
ads appearing on your website, free hosting may be a quick solution to getting your files online.
Paying for web hosting: Perhaps the best option is to purchase service from a company that
specializes in hosting websites. Many offer hosting packages for as little as $10 (US) per month
and include more robust features than free hosting or ISP hosting provides (such as e-mail
service, server-side scripting, and databases). Research your options, and choose a host that
can meet your needs.
If you opt for paid web hosting, you’ll also need to purchase and register a unique domain name to be your
site’s address on the Web. Some hosting companies offer domain registration as an included service (and
some domain registrars also offer hosting services), but securing a domain and securing a host are usually
two separate processes.
We won’t go into all the particulars of registering a domain and getting your site online with a web host.
After all, this is still the first chapter, and numerous resources online can provide more information. To
learn more about hosting your websites when the time comes, just visit your favorite search engine and
have a look around for information about “web hosting basics” or some similar phrase. One good place to
start is the Wikipedia entry about web hosting service (http://en.wikipedia.org/wiki/Web_hosting),
which offers a fairly detailed introduction to set you on your way.
Introducing the URL
Every file or document available on the Web resides at a unique address called a Uniform Resource
Locator (URL). The term Uniform Resource Identifier (URI) is sometimes used interchangeably with URL,
though URI is a more general term; a URL is a type of URI. We’ll be using the term URL in this book to
discuss addressed file locations. It’s this address that allows a web-connected device to locate a specific
file on a specific server in order to download and display it to the user (or employ it for some other
purpose; not all files on the Web are meant to be displayed).
![](https://csdnimg.cn/release/download_crawler_static/10571187/bg12.jpg)
Getting Started
15
The Components of a URL
A web URL follows a standard form that can be broken down into a few key parts, diagrammed in Figure
1-3. Each segment of the URL communicates specific information to both the client and the server.
http://www.example.com/examples/example.html
Protocol Hostname Path
Name Extension
File
Prefix Domain
Figure 1-3. The components of a URL
The protocol indicates one of a few different sets of rules that dictate the movement of data over the
Internet. The Web uses HyperText Transfer Protocol (HTTP), the standard protocol used for transmitting
hypertext-encoded data from one computer to another. The protocol is separated from the rest of the URL
by a colon and two forward slashes (://).
A hostname is the name of the site from which the browser will retrieve the file. The web server’s true
address is a unique numeric Internet Protocol (IP) address, and every computer connected to the Internet
has one. IP addresses look something like “66.211.109.45,” which isn’t very easy on the eyes and is
certainly a challenge to remember. A domain name is a more memorable alias that directs Internet traffic
to an IP address. Many web hostnames feature a domain prefix, further naming the particular server being
accessed (especially when there are multiple servers within a single domain), though that prefix is
frequently optional. A prefix can be almost any short text label, but “www” is traditional. It’s possible for
another entire website to exist separately within a domain under a different prefix, known as a subdomain.
A hostname will also feature a domain suffix (sometimes called an extension) to indicate the domain’s
category, such as “.com” for a U.S. commercial domain, “.edu” for a U.S. educational institution, or “.co.uk”
for a commercial website in the United Kingdom. Every country also has its own domain extension, and
you’ll often see URLs that indicate a country of origin but not any particular category.
The path specifies the directory on the web server that holds the requested document, just as you save
files in different virtual folders on your own computer. Files on a web server may be stored in
subdirectories—folders within folders—and each directory in the path is separated by a forward slash (/).
This path is the route a client will follow to reach the ultimate destination file. The top-level directory of a
website (the one that contains all other files and directories) is called the site root directory and doesn’t
appear in the URL.
The specific file to retrieve is identified by its file name and extension. You can give your files just about
any name you want, and a file extension indicates what type of file it is. An HTML (or XHTML) document
will have an extension of .html or .htm (the shorter version is used on some servers that support only
three-letter file extensions). CSS files use the .css extension, JavaScript files use .js, and so forth. Web
![](https://csdnimg.cn/release/download_crawler_static/10571187/bg13.jpg)
Chapter 1
16
servers are configured to recognize these extensions and handle the files appropriately, processing
different types of files in different ways.
You won’t see a file name and extension in every URL you encounter. Most web servers are configured to
automatically locate a specially named file when a directory is requested without a specified file name.
This could be the file called index.html, default.html, or some other name, depending on the way the
server has been set up. Indeed, most of the various parts of the URL may be optional depending on the
particular server configuration.
The URL is the instrument that allows you to build links to other parts of the Web, including other parts of
your own site. You’ll use URLs extensively in the HTML and CSS you author, which is why we’ve spent so
much time exploring them in this first chapter.
Absolute and Relative URLs
A URL can take either of two forms when it points to a resource elsewhere within the same site. An
absolute URL is one that includes the full string, including the protocol and hostname, leaving no question
as to where that resource is found on the Web. You’ll use an absolute URL when you link to a site or file
outside your own site’s domain, though internal URLs can also be absolute.
A relative URL is one that points to a resource within the same site by referencing only the path and/or file,
omitting the protocol and hostname because those can be safely assumed. It might look something like
this:
examples/chapter1/example.html
If the destination file is kept within the same directory as the file where the URL occurs, the path can be
assumed as well so only the file name and extension are required, like so:
example.html
If the destination is in a directory above the source file, you can indicate that relative path with two dots
and a slash (../), instructing the browser to go up one level to find the resource. Each occurrence of ../
indicates one up-level directive, so a URL pointing two directories upwards might look like this:
../../example.html
Almost all web servers are configured to interpret a leading slash in a relative URL as the site root
directory, so URLs can be “site root relative,” showing the full path from the site root down:
/examples/chapter1/example.html
Lastly, if the destination is a directory rather than a specific file, only the path is needed:
/examples/chapter1/
![](https://csdnimg.cn/release/download_crawler_static/10571187/bg14.jpg)
Getting Started
17
Relative URLs are a useful way to keep file references short and portable; an entire site can be moved to
another domain and all of its relative URLs will remain intact and functional.
Summary
This chapter has provided a high-level overview of what the Internet and World Wide Web are and how
they work. You’ve been introduced to HTML and CSS and are beginning to understand how you can make
these languages work together to produce a rendered web page. You got a short history lesson on how
HTML and CSS have changed over time, and some inkling of what the future holds for these fundamental
web languages. We mentioned a few different text editors you can use to create your documents and
some popular web browsers with which to view them. You’ve also learned a little about web hosting and a
lot about the components of a URL, information you’ll find essential as you begin assembling your own
websites. We haven’t gone into all the gory details in this introduction—after all, we’ve got the rest of the
book to cover them. In Chapter 2 you’ll finally get to sink your teeth into some real HTML and CSS. Buckle
up; this should be a fun ride!
剩余423页未读,继续阅读
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/682f88577b5e496e996b1501ef270ce5_shang_1991.jpg!1)
shang_1991
- 粉丝: 6
- 资源: 44
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 岩石滑动与断层冲击地压:声发射特征分析
- 新时代煤炭工业八大战略新取向剖析
- 开采强度对华亭矿区冲击地压危险性的影响分析
- 新安煤矿探采对比:影响安全生产的关键因素与技术支撑
- 210MW循环流化床锅炉引风机变频改造优化与节能效果
- 浅埋煤层开采沉陷预测:方法应用与影响分析
- 优化巷道过陷落柱支护方案:数值模拟与现场试验
- 坚硬顶板定向断裂爆破技术:安全高效采煤新方案
- 北航2019算法课作业解析:投资策略与凸子多边形优化
- 断层破碎带垮冒下堆积体边界抗力分布关键影响因素
- 哈拉沟选煤厂优化末煤系统提高效率与处理能力
- 瓦斯涌出影响下采动煤体蠕变失稳研究
- 提升煤矿装载效率的可控箕斗定量装载设备设计
- 水分调控下烟煤瓦斯吸附特性对比研究
- 重介质悬浮液密度控制硬件设计与选型探讨
- 坚硬顶板巷道支护参数设计:现场测试与数值分析
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)