36
Chapter
1
review
of basic
html
and
css
Not only is this one fine cup of
House Blend, but now we’ve got
a web page to tell
all our customers about
our coffees. Excellent work. I’ve got some
bigger ideas for the future; in the meantime,
can you start thinking about how we are
going to get these
pages on the Internet so
other people can see them?
HTML and CSS are the languages we use to create
web pages.
Web servers store and serve web pages, which are
created from HTML and CSS. Browsers retrieve
pages and render their
content based on the HTML
and CSS.
HTML is an abbreviation for HyperText Markup
Language and is used to structure your web page.
CSS is an abbreviation for Cascading Style Sheets,
and is used to control the presentation of your
HTML.
Using HTML, we mark up content with tags to
provide structure.
We call matching tags, and their
enclosed content, elements.
An element is composed of three parts: an opening
tag, content, and a closing tag. There are a few
elements, like
, that are an exception to this
rule.
Opening tags can have attributes. We’ve seen one
already: type.
Closing tags have a “/”
after the left angle bracket,
in front of the tag name, to distinguish them as
closing tags.
Your pages should always have an element
along with a
element and a
element.
Information about the web page goes into the
element.
What you put into the element is what you
see in the browser.
Most whitespace (tabs, returns, spaces) is ignored
by
the browser, but you can use it to make your
HTML more readable (to you).
You can add CSS to an HTML web page by
putting the CSS rules inside the