Complete Practical Exercises HTML, CSS & JS
Complete Practical Exercises HTML, CSS & JS
Part 1: HTML
HTML Exercises:
1. Create a file index.html. This should be a simple page that shows the following text:
“Welcome to Eagle IT Solutions”:
2. Crate a file index.html. This should be a simple page that shows the numbers from 1 to 10:
3. Crate a file index.html. This should be a simple page that has its title set to “Eagle IT
Solutions”.
4. Crate a file index.html. This should be a simple page that prints the message "Who created
this page? Check page's title for the answer." to the screen, and set the title of the page to
your full name.
5. Crate a file index.html. This should be a simple page that contains two lists. The first list in
unordered and is a list of subjects: English, Math, Programming, Algorithms and Databases.
The second list is ordered list and contains the following items: pizza, salad and coffee.
Styling HTML Exercises:
1. Create a file index.html. This should be a simple page that shows the following text:
“Welcome to Eagle IT Solutions”. The text should be in blue.
2. Crate a file index.html. This should be a simple page that shows the numbers from 1 to 10.
Each number should be in different color by your choice.
3. Create a file index.html. This should be a simple page that shows the following text:
“Welcome to Eagle IT Solutions”. The text should be in Tahoma font
4. Create a file index.html. This should be a simple page that shows one paragraph with
multiple sentences. Each sentence should be in different font family.
5. Create a file index.html. This should be a simple page that shows one paragraph that is a
description of a book; include the title of the book as well as its author. Names and titles
should be underlined, adjectives should be italicized and bolded.
6. Crate a simple page that showsyour name to the screen with every letter being a different
heading size.
HTML Text Formatting exercises:
1. Create a simple page that shows the squares of the numbers 1 - 20. Each number should be
on a separate line, next to it the number 2 superscripted, an equal sign and the result.
3. Create a simple page that prints an h1 level heading followed by a horizontal line whose
width is 100%. Below the horizontal line print a paragraph relating to the text in the heading.
4. Create a simple page that shows an address in the center of the page:
5. Create a simple page that shows ten acronyms and abbreviations of your choosing, each
separated by two lines. Specify the data that the abbreviations and acronyms represent.
1. Create a simple page that will contain links to Google, Udemy and Coursera:
2. Create a simple page that will contain links to Google, Udemy and Coursera, that when
clicked will open the site in a new window.
3. Create a simple page that at the top will contain a link that when clicked will go to the
bottom of the page. Make sure that you have enough text that will fill the height of the
entire screen:
4. Extend the previous exercise by adding a link at the bottom of the page, that will go to the
top of the page.
3. Create a page where you will display and image that when clicked will open Udemy in a new
window.
4. Create a page where you will display and image that when clicked will open itself in the
browser :
1. Write a JavaScript program to display the current day and time in the following format:
Today is: Tuesday.
Current time is: 10:30
2. Write a JavaScript program to print the contents of the current window
3. Write a JavaScript program to get the current date and print it in the following formats:
mm-dd-yyyy, mm/dd/yyyy or dd-mm-yyyy, dd/mm/yyyy
4. Write a JavaScript program to find the area of a triangle where lengths of the three of its
sides are 5, 6, 7
5. Write a JavaScript program where the program takes a random integer between 1 to 10, the
user is then prompted to input a guess number. If the user input matches with guess
number, the program will display a message "Good Work" otherwise display a message "Not
matched”
6. Write a JavaScript program to calculate multiplication and division of two numbers (input
from user). Note: you can’t divide by 0.
7. Write a JavaScript program to convert temperatures to and from Celsius, Fahrenheit. The
formula is: c/5 = (f-32)/9 , where c is the temperature in Celsius and f is the temperature in
Fahrenheit. For example:
60°C is 140 °F
45°F is 7.222222222222222°C
19. Write a JavaScript program to compute the sum of elements of a given array of integers
20. Write a JavaScript program to check whether 1 appears in first or last position of a given
array of integers. The array length must be greater or equal to 1
21. Write a JavaScript program to check whether the first and last elements are equal of a given
array of integers
22. Write a JavaScript program to reverse the elements of a given array of integers
23. Write a JavaScript program to test whether an array of integers contains the values 1 or a 3
24. Write a JavaScript program to swap the first and last elements of a given array of integers.
25. Write a JavaScript to find the longest string from a given array of strings
1. Make a tribute page of some famous person (actor, author, scientist… you choose), writing
about that person, adding mage, biography etc. On the top of the webpage, add the image
and name of the person and below that give layout for the rest of the details. You can use
paragraphs, lists, links, images with CSS to give it a descent look. Add a suitable background
color and font style on your webpage. Most of the parts you can make using HTML but to
give it a better look using a bit of CSS. For example:
2. Create a simple page that will act as a survey. All fields should be required. The output
should look like this:
When you fill the form and you click submit reset the form and show an alert message that
“The survey was completed successfully”.
3. Make simple page that will act as simple calculator. Use simple HTML, CSS, and make all the
components work using basic JavaScript functions. To display buttons and numbers, use
HTML, and add some beautification to them using CSS. To make the buttons perform the
respective functions use JavaScript, which also will be used for displaying the result. Try and
design the calculator like the following:
Hint: Use HTML table. Use CSS properties like border, border-radius, background-color,
color, font-size, font-style, text-align, padding, margin. Use JavaScript for the clicks(inputs)
and calculating the result
4. Using HTML and CSS, create a simple page that will be a landing page. The resulting page
should look like this:
Note: Use your own images and colors.
Recommended web sites:
- HTML: https://www.w3schools.com/html/default.asp
- CSS: https://www.w3schools.com/css/default.asp
- JavaScript: https://www.w3schools.com/js/
Recommended playlists: