html lesson 2

8
Background and images Lesson 2 By: Hector Tejada

Upload: tonyc445

Post on 15-Dec-2014

436 views

Category:

Education


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: HTML Lesson 2

Background and

imagesLesson 2

By: Hector Tejada

Page 2: HTML Lesson 2

Objectives Learn how to change the background

color or to an image Learn how to add an image to the site Learn how to change font color

Requirements: Notepad images

Page 3: HTML Lesson 2

Step 1

In your body tag you need to have the background attribute. Then type in your file name and type. It will look like the image below. Warning though if the image is not big enough it will repeat itself and the image needs to be in the same location as the html.

Page 4: HTML Lesson 2

Step 2

If you do not like having an image for a background you can choose a color. Instead of the background attribute, you use the bgcolor attribute. Then you type in the color you want or type in the hex value for that color.

Page 5: HTML Lesson 2

Step 3

Next option you have is changing the font colors. This is useful if you have a background that makes the text difficult to read. You use the font tag with the color attribute. The tag will look like this <font color=“nameofcolor”>

Page 6: HTML Lesson 2

Step 4

You can change the font style. You need to use the font tag as well as the face attribute. The tag looks like this <font face=“name_of_font_style”>You can also change the font size with the font tag and size attribute.

Page 7: HTML Lesson 2

Review

You should now how to:• Change the background image• Change the background color• Change the font color• Change the font style and size

Page 8: HTML Lesson 2

Assessment

Now that you have learn how to do all of that I want you to show what you know by recreating those pages. You can use any image as the background. It needs to have a different style of text and color.