Professional Documents
Culture Documents
HTML-and-CSS-Overview-and-HTML-Structure-Exercises
HTML-and-CSS-Overview-and-HTML-Structure-Exercises
Problems for exercises and homework for the "HTML and CSS" course @ SoftUni. Submit your solutions in the
SoftUni judge system at https://judge.softuni.bg/Contests/394/HTML-and-CSS-Overview .
1. My First Page
Create a Web Page like the following.
Create “my-first-page.html”
Constraints
<h1> tag for heading
<p> tag for paragraph
2. Definition Lists
Create a Web Page like the following.
Create “definition-lists.html”.
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
3. Reversed List
Create a Web Page like the following.
Constraints
<div> with id=wrapper as a container
o Background color: #dddddd
o Text color: #95191a
o Width container: 300px
o Border: 1px solid #000000
Hints
Use:
<ol> with reversed attribute
o <ol reversed="reversed">
Submit only reversed-list.html + reversed-list.css in ZIP file
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
Constraints
<div> with id = wrapper as a container
o Background color: #5BC0DE
Hints
Use:
<h1> and <h2> tags for headings
<sup> tag for superscript text
<p> tag for paragraphs and <span> for Hello, Stranger!
<ul> tag for list items
<hr /> for horizontal line
<footer> tag for copyright part + © for copy right symbol
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
Constraints
<body>
o font-family: "Lato", sans-serif;
<nav> tag as container
Use unordered list in the navigation section
o Padding: 0;
o Heigth: 40px;
o Line Heigth: 30px;
o Background Color: #84b3ad;
<li> tag for list item
o Width: 100px;
o Margin: 0 5px;
o Padding: 5px 0;
o Cursor: pointer;
o Text color: #ffffff;
o Center the text
<li> on hover
o Background Color: #135e3e;
o Padding: 5px 0;
Put a hyperlink in each list item in the navigation bar.
Remove the text decoration and fix its color:
o Put “text-decoration: none;” for the “li a” CSS selector.
o Change the color for the “li a” CSS selector.
Hints
<li> with display:inline-block; in the CSS file
Put in your CSS all @font-face definitions from https://fonts.googleapis.com/css?family=Lato:300,400,900
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
simple-nav-bar.html
<!DOCTYPE html>
<html>
<head>
<title>Simple Navigation Bar</title>
<link rel="stylesheet" href="simple-nav-bar.css">
</head>
<body>
<nav>
<ul>
<li><a href="#">Home</a></li>
<--TODO: put the rest of list item here -->
</ul>
</nav>
</body>
</html>
simple-nav-bar.css
@font-face … (include the code from https://fonts.googleapis.com/css?
family=Lato:300,400,900)
body { // TODO }
ul { // TODO }
li { // TODO }
li a { // TODO }
li:hover { // TODO }
6. Simple Article
Create a Web Page like the screenshot below.
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
Constraints
<body>
o font-family:"Lato", sans-serif;
"https://fonts.googleapis.com/css?family=Lato:300,400,900"
Content
o Width: 550px;
o Border radius: 15px;
o Center the content
o Padding: 25px;
o Background color: #fafafa;
o box-shadow: 10px 11px 35px -14px rgba(0,0,0,0.54);
<h1> tag for heading
o Margin bottom: 0;
o Padding: 10px;
o Text center
o Letter spacing: 5px;
Image
o Width: 200px;
o Border radius: 50%;
o Margin: 15px;
o Border: 5px dotted #8b603d;
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
7. Table
Create a Web Page like the following.
Constraints
Font-family: "Lato", sans-serif;
Table
o Text color: #333333;
o Border spacing: none;
o Center the table
Table headings
o Text color: #ffffff;
o Background color: #90b4d6;
o Center the text
o Letter spacing: 2px;
Table heading for bold text
o Padding: 5px 30px 5px 10px;
o Text size: 18px;
o Margin: 0;
o Text align: left;
o Background color: #84b3ad;
Table data
o Padding: 5px 30px 5px 10px;
o Text size: 18px;
o Margin: 0;
o Text align left
o Background color: #84b3ad;
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
Hints
Use:
tr:nth-child(even) td, tr:nth-child(even) th {
Background color: #689ad8;
}
Search search in Internet for the HTML entities representing the currency symbols:
https://www.google.bg/search?q=html+entities+currency+symbols.
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.