Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    13
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Create a CSS from HTML

    My assignment is to create a CSS from this HTML that will include the attributes for the body and table tags from the HTML....I am so lost! Can someone walk me through this? Thanks so much for ANY help!

    Code:
    <html>
    
    <head>
    <title>Brazil - Banks</title>
    </head>
    
    
    <body bgcolor="991111">
    <table width="900" border="10" cellpadding="10" bgcolor="000099">
    
    <tr>
    <td colspan="2" align="center" bgcolor="00CC33"><h1> <font size="100" face="chiller" color="000099">
    <strong>Brazil</strong></font></h1></td>
    </tr>
    
    <tr>
    <td>
    <a href="index.html"width="360"><font size="2" face="arial" color="white"><center>Home</center></a>
    
    <td>
    <a href="page1.html"width="360"><font size="2" face="arial" color="white"><center>Page 1</center></a>
    </tr>
    
    <tr>
    <td width="360"><center><font size="5" face="arial" color="gold"><strong>DEMOGRAPHICS</strong></center>
    <br/>
    
    <font size="3" face="arial" color="white">
    <center><strong>Capital:</strong><br/> Brasília<br/>
    <br/>
    <strong>Largest City:</strong> <br/>São Paulo<br/>
    <br/>
    <strong>Official Language:</strong> <br/>Portuguese<br/>
    <br/>
    <strong>
    Ethnic groups:
    </strong> <br/>
    48.43% White, 
    43.80% Brown, <br/>
    6.84% Black, 
    0.58% Asian, 
    0.28% Amerindian
    <br/>
    <br/>
    <strong>Government:</strong> 
    <br/>Federal presidential constitutional republic<br/>
    <br/>
    <strong>Population:</strong><br/> 2011 Census - 203,429,000
    </center><br/>
    <br/>
    <font size="2" face="times new roman italic" color="white"><cite>CIA World Factbook</cite>
    
    
    <td width="300"><center><img src="images/girl.jpeg"width="350" alt="Brazilian Girl"></td></center>
    </p></td>
    </tr>
    
    
    
    
    
    <tr>
    <td width="370"><center><img src="images/food.jpeg" width="350" alt="food photo"></td></center>
    <td width="374"><font size="5" face="arial" color="995511"><center><strong>CUISINE</strong></center>
    <br/>
    
    
    <font size="2" face="arial" color="white"><strong><center>
    Brazilian cuisine, like Brazil itself, <br/>
    varies greatly by region. The natural crops <br/>
    available in each region add to their singularity.<br/>
    Brazilian cooking, while it has many similarities <br/>
    with that of its South American neighbors, is distinct. <br/>
    Stretching from the Amazon in the north, through the <br/>
    fertile plantations of the central coast and on to the <br/>
    southern pampas, the food of Brazil spans a unique <br/>
    mix of cultures and cuisines. The original population <br/>
    contributed popular ingredients like cassava and guaraná. <br/>
    African slaves influenced the cuisine of the coastal states, <br/>
    especially Bahia. And around the country, a Portuguese <br/>
    heritage is reflected in a variety of dishes.</strong></center><br/>
    <br/>
    <br/><br/>
    <font size="2" face="times new roman italic" color="white"><cite>CIA World Factbook</cite>
    </td>
    </tr>
    <br/>
    <tr>
    <td width="374"><font size="5" face="arial" color="00CC33"><center><strong>GEOGRAPHY</strong></center>
    
    <font size="2" face="arial" color="white"><strong><center><p/>
    Brazil occupies a large area along the eastern coast of South America and 
    includes much of the continent's interior, sharing land borders with 
    Uruguay to the south; Argentina and Paraguay to the southwest; Bolivia and 
    Peru to the west; Colombia to the northwest; and Venezuela, Suriname, 
    Guyana and the French overseas department of French Guiana to the north. 
    It shares a border with every country in South America except for Ecuador 
    and Chile. It also encompasses a number of oceanic archipelagos, such as 
    Fernando de Noronha, Rocas Atoll, Saint Peter and Paul Rocks, and Trindade 
    and Martim Vaz. Its size, relief, climate, and natural resources make 
    Brazil geographically diverse.</strong></center>
    <br/>
    <br/>
    <br/>
    <font size="2" face="times new roman italic" color="white"><cite>CIA World Factbook</cite>
    
    <td width="370"><center><img src="images/map.jpeg" width="420" alt="Map of Brazil"></td></center>
    </p></td>
    </tr>
    
    <tr>
    <td colspan="2" align="center"><a href="mailto:newbanks@triad.rr.com"> <font size="2" face="arial" color="gold">
    <strong>Email Me</strong></a></td>
    </tr>
    
    <tr>
    <td colspan="2" align="center"bgcolor="00CC33"><h1><font size="3" face="arial" color="ffffff"><strong>
    <br/>
    <a href="https://www.cia.gov/library/publications/the-world-factbook/"> <font size="3" face="arial" color="99000">
    For more Information on Brazil</h1></a></td>
    </tr>
    
    <tr>
    <td colspan="2" ><font size="2" face="arial" color="111111">
    <font size="2" face="times new roman italic" color="white">
    <cite>
    CIA World Factbook. 2011. https://www.cia.gov/library/publications/the-world-factbook/<br/>
    http://t1.gstatic.com/images<br/>
    CIA World Factbook. 2011. https://www.cia.gov/library/publications/the-world-factbook/<br/>
    http://t0.gstatic.com/images<br/>
    CIA World Factbook. 2011. https://www.cia.gov/library/publications/the-world-factbook/<br/>
    http://t1.gstatic.com/images<br/>
    
    </cite>
    </td>
    </tr>
    
    </table>
    </center>
    </body>
    </html>
    Last edited by WA; 11-23-2011 at 06:03 AM.

  • #2
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    A homework assignment yay!

    CSS is simply HTML, but not directly in the html

    For starters, add a doctype!
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
       <head></head>
       <body></body>
    </html>
    Let's take a look at the <body> tag, it has bgcolor="". In css this is "background-color:"

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html>
    	<head>
    		<title>Brazil - Banks</title>
    		<style type="text/css">
    			
    			body {
    				background-color: #991111; /* same thing as bgcolor in html! */
    			}
    			
    		</style>
    	</head>
    	<body bgcolor="991111">
    	</body>
    </html>
    now moving onto the table,

    Code:
    <table width="900" border="10" cellpadding="10" bgcolor="000099">
    this would be

    Code:
    table {
       width: 900px;
       border: 10px solid;
       background-color: #000099;
    }
    table td {
       padding: 10px;
    }
    http://w3schools.com/css/default.asp

    good luck!

    EDIT: The link isn't working for me right now, maybe they are under some attack! For the css replacements, just google it like this: "bgcolor in css"
    Last edited by Sammy12; 11-23-2011 at 06:50 AM.

  • Users who have thanked Sammy12 for this post:

    newbanks (11-23-2011)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •