Exercise: Install Xampp, write an HTML page and its corresponding CSS
Install Xampp
Software Requirements
- Download XAMPP from ApacheFriends server:
download xampp (versions exist for windows, Mac and Linux)
According to my experience, Mac and Linux users can install this software easily (if you still have problems, ask me), the instructions are only given to Windows users. -
Extract the content of this file in any of your directories. For instance
Q:\MyDir\. -
Execute the file
setup-xampp.batin the installation directory (in our exampleQ:\MyDir\xampp\). - You can start xampp using the programm:
xampp_start.exe - You can stop xampp using the programm:
xampp_stop.exe - You can restart xampp using the programm:
xampp_restart.exe - Test your server by clicking on : http://localhost.
Write your first file
- You can now install your php arborescence in the directory
Q:\MyDir\xampp\htdocs\. - Write a file called
hello.htmlin the directoryQ:\MyDir\xampp\htdocs\.
Content of the file:<html><body> <h1>Hello World</h1> </body></html>
Now test that it works: http://localhost/hello.html
Write a small HTML file
Enhance the filehello.html by adding content in your page. You should have at least one title <h1> and 3 headings <h2>. One of them should belong another to the class "red".
Write a small CSS file
Create a css filestyle.css. Include this file in your html file. Use the CSS to define that all <h1> tags must have a light blue background, all <h2> must be underlined and all <h2> of the class red must be red ;-)
Solutions
Related Pages
Contact
Prof. Dr. Emmanuel Benoist
Berner Fachhochschule - TI
Quellgasse 21
CH-2501 Biel/Bienne
Switzerland
Mail: emmanuel.benoist (at) bfh.ch
Berner Fachhochschule - TI
Quellgasse 21
CH-2501 Biel/Bienne
Switzerland
Mail: emmanuel.benoist (at) bfh.ch
Social Networks
Follow
me
on
Linkedin, Scholar
& Research gate