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

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. 





發佈了52 篇原創文章 · 獲贊 18 · 訪問量 11萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章