LAB 1: Web Application 1 [Html and CSS]
Objective: To develop a web application
To enhance mobile web pages using CSS
Step 2 : Create directory
Goto Dashboard>File Manager
Create a sub folder called products
all html, PHP pages are to be saved in this folder
Step 3 :
Goto Dashboard>File Manager
Create a sub folder called products
all html, PHP pages are to be saved in this folder
Step 3 :
Create another subfolder called css
Click on Product> Create Directory> css
all css file, images are to be saved in this folder
Click on Product> Create Directory> css
all css file, images are to be saved in this folder
Let’s get started with creating a main.html page
(1) Upload smartfarm.jpg from the picture below to the css folder of your atspace server:
Right clicked >>Copy Image Address
((3) Create a main.html page
Click on Up Level button to go to product subfolder
Click on Create> Create File> Type main.html
Double click on main.html.
Copy and paste the code below on main.html
Click on Up Level button to go to product subfolder
Click on Create> Create File> Type main.html
Double click on main.html.
Copy and paste the code below on main.html
<html> <head> <!--Link to an External Style Sheet --> <style> </style> </head> <body> <h1> Smart Farming </h1> <div align="center"> <img src="css/smartfarm.jpg" width="30%" height="30%"><br> </div> </body> </html>
If you are able to see the page above means you have
Written the html file correctly, and you know where to place the files in the web server .
CSS (Cascading Style Sheets)
is used to style and lay out web pages — for example, to alter the font, colour, size and spacing of your content, split it into multiple columns, or add animations and other decorative features.
We will be looking at:
- External Style Sheet
- Internal Style Sheet
- styles to Individual Elements
1) Create a css file , named myStyle.css with the following codes and saved it in the css folder
li { display:inline-block; background:yellow; color:blue; margin-right:10px; }
2) Create a css file , named myStyle.css with the following codes and saved it in the css folder
3) Linking main.html to external style sheet myStyle.css
<link href="css/myStyle.css" rel="stylesheet" type="text/css"/>
4) Applying styles to Individual Elements on main.html
Type the following in the <body tag> to set the background color to green (RGB)
<body bgcolor="#00FF00"> <!--styles to Individual Elements-->
No comments:
Post a Comment
Note: only a member of this blog may post a comment.