HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 3. HEAD SETS THE STAGE 24


The body portion of a webpage, which we discussed in Chapter 2 (page 13),
specifies the content to be presented.


The head portion of a webpage, which we discuss in this chapter, sets the
stage for the body portion.


As web designers, we basically care about two things.


(1) Does our webpage look the way we want on all browsers and all devices?


(2) Do the search engines push traffic to our website.


The way we write our webpages will determine how things go. There is a
very precise language for writing webpages. We will want to do our best to
follow these standards.


3.1 Template


To help you out, I am going to jump the gun here just a bit, and give you
a very short template that you can use on all your webpages.You should
memorize this.It has the key elements that you will need. We will discuss
them below.


<!DOCTYPE html>


Your Title Goes Here


Your Marked-Up Content Goes here

3.2 Achieving Trust


The web is old. People have been making webpages for many, many years,
and there are many, many webpages that do not follow the currently ac-
cepted standards.


Browsers are (and need to be) incredibly resilient. They want to do the right
thing. They will do their best to display anything that shows up purporting
to be a webpage. Sometimes webpages do not follow the rules of the HTML

Free download pdf