bbb Home |
Lesson 3 - Format Home Page Using Style |
SUMMARYIn this lesson you will modify the home page for your game. You will learn how to use style to change the appearance of your web page. You will also learn how to make pages change in response to users action by using dynamic HTML (DHTML). DISCUSSIONCascading Style Sheets (CSS) or Style is an approach to change the appearance of one web page or many web pages. Style can be added using one of three approaches: in-line, internal, and external. In this lesson, only the in-line approach will be discussed. To add style to a tag we add the following to the opening tag: <tag style = "style-prop1: value1; prop2:value2; prop3: value3"> where tag will be replaced by an actual tag and style-prop1, prop2, prop3, value1, value2, and value3 will be replaced by actual properties and values. We can add as few as one property or as many properties as you want. There are over 100 different properties and many possible values for each. In line 3 in the example below, we add style to the <body> tag so that the background color of the page is black and the color of the text in the page is white. Notice the following:
In line 4, we add a <div> tag. A <div> tag is used as a "container" to enclose content. <div> tags force line breaks before and after the <div>. In line 4, we add add style to the <div> so that text within the <div> has a size of 24 points and is arial. Notice that the text in the <div> on line 5 is not affected by the style properties defined for the <div> in line 4. Visit the Web Design Tutorial for more information. EXAMPLE - Adding Style
GAME DEVELOPMENTModify your home page for your game.
|
©dfx interactive, inc. Contact us at bigbadbrain@bigbadbrain.com |