This document provides an overview of building and marketing websites. It discusses HTML, the basic building block for webpages, and CSS, which is used to style HTML elements and control presentation. HTML uses tags like <h1> and <p> to structure content and images are added using the <img> tag. CSS rules are defined within <style> tags and use selectors like h1 to target elements and declarations like border: 2px solid black; to style them. CSS allows combining selectors to apply styles to multiple elements.
6. How Browser Displays Images
1. Loads HTML
2. Looks through HTML for image tags
3. Asks Server for each image it finds in HTML
peanut-butter.jpg
HTML
8. Element Attributes
• Instructions that clarify or modify an element.
<element attribute-name="value">Content</element>
<element attribute-name="value" />
<img src=“peanut-butter.jpg” alt=“Sandwich” />
9. HTML comments
• <!– Comment goes here -->
• Great for leaving notes to yourself
13. Style element
<html>
<head>
<title>Simple Website</title>
<style type=“text/css”>
</style>
</head>
<body>
<h1>Welcome</h1>
<p>This is a demonstration.</p>
</body>
</html>
14. Style sheet
<head>
<title>Simple Website</title>
<style type=“text/css”>
p { border:2px solid black; }
</style>
</head>
• Made up of one or more style instructions
(called rules)
• Rules describe how an element or group of
elements should be displayed.
16. Selector
<style type="text/css">
h1 { border:2px solid green; }
p { border:2px solid black; }
img { border:2px solid red; }
</style>
• Example of element type selector
• Most basic type of selector