The language of the web --Head First into HTML and CSS Chapter 1

本文深入探讨了web服务器在互联网上的全职工作,包括接收来自浏览器的请求并响应资源的过程。它解释了浏览器如何通过HTML理解页面结构与内容,以及CSS如何提供样式来美化内容。通过具体的标签示例,如<h1>,展示HTML元素的组成,并介绍CSS用于样式定义。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. Web servers have a full-time job on the Internet, tirelessly waiting for requests from web browsers. What kinds of requests? 

Requests for web pages, images, sounds, or maybe even a video. When a server gets a request for any of these resources, the server finds the resource, and then sends it back to the browser.




Browser 




But how does the browser know how to display a page? That’s where HTML comes in. HTML tells the browser all about the content and structure of the page.


Tags


tags tells the browser about the structure and meaning of the document.

Browser will ignore space in the text. it relies on the tags to determine where line and paragraph happens 


<h1> Starbuzz Coffee </h1> 

opening tag -- content-- closing tag: <h1> element


element = opening tag + content + closing tag; //some tags are void tags without content


tags are often nested 



CSS


css will give you a way to present / style your content.


<style type="text/css">          //with attribute type

body {
background-color: #d2b48c;
margin-left: 20%;
margin-right: 20%;
border: 2px dotted black;
padding: 10px 10px 10px 10px;
font-family: sans-serif;
}
</style>


attribute: provide additional information about an element. 





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值