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.