您的位置:首页 > Web前端 > CSS

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

2015-05-01 11:24 597 查看
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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: