Installation guide
3
</body>
</html>
Now create a root folder of images under WebContent, copy kth.png and kth_rgb.jpg into
images, and refresh the project.
Then write the following lines of html between the <body> and </body> tags.
<div>
<h2><a>
<img width="80" height="80" src="images/kth_rgb.jpg"/> Kungliga
Tekniska Högskolan – KTH
</a></h2>
<a><img src="images/kth.png"/></a>
<p>SE-100 44 Stockholm Sweden</p>
<p>+46 8 790 60 00</p>
</div>
Click the Run button (the logo in the red box as it is shown below) to run it on the server, copy
the URL http://localhost:8080/Lab1/index.html into the web browser. Try to test the webpage in
different web browsers as well. Note that it may take several seconds for the server to update
when you have any HTML changes.
Now CSS will be used to control the style and layout of multiple web pages all at once. Right click
WebContent and New -> Other…-> Web/CSS File, and name the new file as style.css. Write the
following code into the style.css file.
* {
margin: 50; padding: 0;
}
body {
text-align: center;
background-color: #e9e9e9;
}
Link this CSS file to the index.html file by writing the following code into the index.html between
the <head> and </head> tags. Observe the changes in margins, layout, and background color.
<link rel="stylesheet" href="style.css" type="text/css"
charset="utf-8" />