-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
The HTML and CSS Workshop
By :
Each great journey begins with a humble step. Our upcoming adventure in the land of HTML and CSS is no exception. Before we can do awesome things with data, we need to be prepared with a productive environment. In this section, we shall see how to do that.
In this book, we have used Chrome version 76, which was the latest version at the time of publication. Make sure you have downloaded and installed the latest version of Chrome to ensure an optimal experience.
To install Chrome on Windows, follow the instructions given here: https://www.google.com/chrome/
For other platforms such as macOS and Linux, scroll down to the bottom left-hand corner of this website: https://www.google.com/chrome/ and click on Other Platforms, and choose accordingly.
Here are the steps to install Visual Studio Code (VSCode):

Figure 0.1: Downloading VSCode
Extensions icon, and type in Open In Default Browser in the search bar, as shown in the following screenshot:
Figure 0.2: Open in Default Browser extension search
Install to complete the installation process, as shown in the following screenshot:
Figure 0.3: Installing the extension
Some exercises in the book will require the use of a personal web server to run the scripts and view the pages you'll be creating. If you do not have a personal web server already set up, you can use the following steps to get one installed.
To begin, you will need to go to https://www.apachefriends.org/index.html and download the XAMPP package for your operating system. XAMPP is available for Windows, Mac, and Linux.
Apache is highlighted in green, then the web server is running:
Figure 0.4: The XAMPP Control Panel
If it is not highlighted in green, then you will need to start the Apache web server:

Figure 0.5: Starting the Apache Web Server for Windows
Start button in the control panel that corresponds to Apache. The web server will then initialize and start so you can use it.localhost into the browser's URL bar and then hit Enter:
Figure 0.6: Navigating to localhost in the browser
If your installation was successful and Apache is running, you will get the XAMPP welcome page:

Figure 0.7: Viewing the XAMPP Welcome Page
Explorer tab:
Figure 0.8: Navigating to the File Explorer
htdocs. This is the folder that holds any files that you want to view in the browser:
Figure 0.9: Viewing the Web Server Folders and Files
applications.html. If we want to access this file in the browser, we would type localhost/applications.html:
Figure 0.10: Navigating to the applications.html Page
.dmg file (for example: xampp-osx-7.4.5-0-vm.dmg)
Figure 0.11: XAMPP Installation screen
Finder -> Applications -> XAMPP OR press CMD + Space (Spotlight search) and type "XAMPP". You will see the following result:
Figure 0.12: MAC Finder screen with Applications folder view

Figure 0.13: First time installation screen
OK on this screen and then it will ask your password in the next screen. Once you enter your password, the next screen will appear which looks like this:
Figure 0.14: XAMPP Control panel
Start button to start the service (observe the red dot and IP address is empty) Start button, you will see green-dot and IP address as shown in the following figure:
Figure 0.15: XAMPP control panel with active "General" Tab
Services" tab and check status:
Figure 0.16: XAMPP control panel with active "Services" Tab
General" tab and click on "Go To Application" button OR copy the IP address and go to your browser and hit enter. It will open default (welcome) page of XAMPP in your default web-browser. Go through this page, it will give you basic information:
Figure 0.17: XAMPP Welcome screen
Network" tab and enable the below port:
Figure 0.18: XAMPP control panel with active "Network" Tab
localhost:8080 (as visible in the above figure) and you will see the same "Welcome" screen.Volumes" tab and click on the "Mount" button. Once clicked, the other two options "Unmount" & "Explore" will be activated for you. Now click on "Explore" button to go to the LAMPP folder:
Figure 0.19: XAMPP control panel with active "Volumes" Tab
Explore" button, you see Finder window will open and search for "htdocs" folder as shown below:
Figure 0.20: Finder with htdocs view
There you can see applications.html file.

Figure 0.21: XAPP welcome screen
General" tab, click "Stop" button.Downloads folder.Downloads and type the following codes:chmod 755 xampp-linux-x64-7.4.5-0-installer.run sudo ./xampp-linux-x64-7.4.5-0-installer.run

Figure 0.22: Linux setup (installation) screen
Next button and follow other instructions, until you see the installation process starting as shown in the following figure:
Figure 0.23: Linux setup (installation) screen

Figure 0.24: Linux setup (installation) screen
Finish button to launch the XAMPP. XAMPP Control panel will look like this:
Figure 0.25: XAMPP Control Panel with active "Welcome" tab
Manage Servers" tab and clicking on Start All button:
Figure 0.26: XAMPP Control Panel with active "Manage Servers" tab
Welcome tab, click on the "Open Application Folder", which will open "/opt/lampp" folder. Search for "htdocs" folder and click on it. You will see applications.html file.http://localhost/applications.html". You will see Apache Welcome screen. From the control panel you can start/stop any services.Download the code files from GitHub at https://packt.live/2N7M3yC and place them in a new folder called C:\Code. Refer to these code files for the complete code bundle.
If you face any trouble with installation or with getting the code up and running, please reach out to the team at [email protected].
Change the font size
Change margin width
Change background colour