HTML – Semantic Web

Решения на задачите от лекция „Semantic web“

Задача 1

<!DOCTYPE html>
<html class="no-js">
<head>
<title>Refactoring homework</title>
<meta charset="UTF-8">
<script src="modernizr.js">
</script>
</head>
<body>
<header>
<h1>
The Header
</h1>
<nav>
<ol>
<li>
<a href="#">
nav item 1
</a>
</li>
<li>
<a href="#">
nav item 2
</a>
</li>
<li>
<a href="#">
nav item 3
</a>
</li>
<li>
<a href="#">
<strong>nav item 4</strong>
</a>
</li>
</ol>
</nav>
</header>
<section>
<header>
<h2>
This is the heading of the main section
</h2>
</header>
<article>
<header>
<h3>
Post header
</h3>
</header>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing <strong>elit</strong>. Mauris urna orci, euismod vitae sollicitudin et, varius et velit. Cras et tellus erat. Vestibulum auctor varius purus faucibus posuere. Maecenas et libero et orci bibendum eleifend sit amet ut purus. Sed at lorem in metus tempus pretium. Praesent cursus rhoncus nulla. Nulla condimentum lacus et ligula consectetur eu tristique sem scelerisque. Duis id velit enim, sed sodales nulla. Donec leo erat, posuere vel scelerisque in, rutrum ac magna. <em>Donec elementum nunc molestie nulla semper</em> vitae placerat turpis bibendum. Phasellus egestas lobortis dictum.
</p>
</article>
<article>
<header>
<h3>
Post header
</h3>
</header>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing <strong>elit</strong>. Mauris urna orci, euismod vitae sollicitudin et, varius et velit. Cras et tellus erat. Vestibulum auctor varius purus faucibus posuere. Maecenas et libero et orci bibendum eleifend sit amet ut purus. Sed at lorem in metus tempus pretium. Praesent cursus rhoncus nulla. Nulla condimentum lacus et ligula consectetur eu tristique sem scelerisque. Duis id velit enim, sed sodales nulla. Donec leo erat, posuere vel scelerisque in, rutrum ac magna. <em>Donec elementum nunc molestie nulla semper</em> vitae placerat turpis bibendum. Phasellus egestas lobortis dictum.
</p>
</article>
<article>
<header>
<h3>
Post header
</h3>
</header>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing <strong>elit</strong>. Mauris urna orci, euismod vitae sollicitudin et, varius et velit. Cras et tellus erat. Vestibulum auctor varius purus faucibus posuere. Maecenas et libero et orci bibendum eleifend sit amet ut purus. Sed at lorem in metus tempus pretium. Praesent cursus rhoncus nulla. Nulla condimentum lacus et ligula consectetur eu tristique sem scelerisque. Duis id velit enim, sed sodales nulla. Donec leo erat, posuere vel scelerisque in, rutrum ac magna. <em>Donec elementum nunc molestie nulla semper</em> vitae placerat turpis bibendum. Phasellus egestas lobortis dictum.
</p>
</article>
<article>
<header>
<h3>
Post header
</h3>
</header>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing <strong>elit</strong>. Mauris urna orci, euismod vitae sollicitudin et, varius et velit. Cras et tellus erat. Vestibulum auctor varius purus faucibus posuere. Maecenas et libero et orci bibendum eleifend sit amet ut purus. Sed at lorem in metus tempus pretium. Praesent cursus rhoncus nulla. Nulla condimentum lacus et ligula consectetur eu tristique sem scelerisque. Duis id velit enim, sed sodales nulla. Donec leo erat, posuere vel scelerisque in, rutrum ac magna. <em>Donec elementum nunc molestie nulla semper</em> vitae placerat turpis bibendum. Phasellus egestas lobortis dictum.
</p>
</article>
</section>
<footer>
and the footer
</footer>
</body>
</html>

Задача 2

<!DOCTYPE html>
<html class="no-js">
<head>
<title>Our Web Site</title>
<meta charset="UTF-8">
<style>
h1
{
position:relative;
left:400px;
font-size:300%;
}
nav
{
position:relative;
left:100px;
}
a
{
text-decoration : none;
color : #000000;
font-size:130%
}
img
{
position:absolute;
left:100px;
}
table
{
position:relative;
left:100px;
text-align:center;
font-size:150%
}
</style>
<script src="modernizr.js">
</script>
</head>
<body>
<header>
<div>
<img src="logo.jpg" alt="logo"/>
<h1>
Welcome to Our Web Site
</h1>
<br/>
</div>
<nav>
<ul>
<li>
<a href="#">
nav item 1
</a>
</li>
<li>
<a href="#">
nav item 1
</a>
</li>
<li>
<a href="#">
nav item 1
</a>
</li>
<li>
<a href="#">
nav item 1
</a>
</li>
</ul>
</nav>
<br/>
</header>
<section>
<table border="1" cellspacing="0" cellpadding="5">
<thead>
<tr>
<th>
First Name
</th>
<th>
Last Name
</th>
<th>
Score
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Doncho
</td>
<td>
Minkov
</td>
<td>
4.54
</td>
</tr>
<tr>
<td>
Svetlin
</td>
<td>
Nakov
</td>
<td>
4.31
</td>
</tr>
<tr>
<td>
Georgi
</td>
<td>
Georgiev
</td>
<td>
4.54
</td>
</tr>
</tbody>
</table>
</section>
</body>
</html>

Задача 3

<!DOCTYPE html>
<html class="no-js">
<head>
<title>LinkedIn</title>
<meta charset="UTF-8">
<style>
#mainHeader
{
border-bottom-style:solid;
border-width:2px;
border-color:#909090;
}
fieldset
{
border-style:solid;
border-width:1px;
border-color:#F0F0F0;
}
input.button
{
-webkit-border-radius: 5px;
background-color:#E8E8E8;
}
</style>
<script src="modernizr.js">
</script>
</head>
<body>
<header id="mainHeader">
<h1>
<a href="#">
LinkedIn
</a>
</h1>
<nav>
<ul>
<li>
<a href="#">
Home
</a>
</li>
<li>
<a href="#">
What is LinkedIn?
</a>
</li>
<li>
<a href="#">
Join Today
</a>
</li>
<li>
<fieldset >
<legend>Sign In</legend>
<form action="#" method="POST">
<ul type="circle">
<li>
<label for="email">
Email:
</label>
<input type="email" id="email" name="email"/>
</li>
<li>
<label for="password">
Password:
</label>
<input type="password" id="password" name="password"/>
</li>
<li>
<input type="submit" name="signIn" value="Sign In" class="button"/>
</li>
</ul>
</form>
</fieldset>
</li>
</ul>
</nav>
</header>
<section>
<header>
<h2>
Over 175 million professionals use LinkedIn to exchange information, ideas and opportunities
</h2>
</header>
<ul>
<li>
Stay informed about your contact and industry
</li>
<li>
Find the people &amp; knowledge you need to achieve your goals
</li>
<li>
Control your professional identity online
</li>
</ul>
</section>
<section>
<header>
<h3>
Join LinkedIn Today
</h3>
</header>
<fieldset >
<legend>Sign Up</legend>
<form action="#" method="POST">
<ul>
<li>
<label for="FirstName">
First Name:
</label>
<br/>
<input type="text" id="FirstName" name="FirstName"/>
</li>
<li>
<label for="LastName">
Last Name:
</label>
<br/>
<input type="text" id="LastName" name="LastName"/>
</li>
<li>
<label for="emailJoin">
Email:
</label>
<br/>
<input type="email" id="emailJoin" name="emailJoin"/>
</li>
<li>
<label for="passwordJoin">
Password:
</label>
<br/>
<input type="password" id="passwordJoin" name="passwordJoin"/>
<br/>
6 or more characters
</li>
</ul>
<input type="submit" name="Join" value="Join Now" class="button" />
<a href="#">*</a>
</form>
<p>Already on LinkedIn?
<a href="#">
Sign in.
</a>
</p>
</fieldset>
</section>
<section>
<header>
<h3>
Search for someone by name:
</h3>
</header>
<form action="#" method="POST">
<ul>
<li>
<label for="FirstNameSearch">
First Name:
</label>
<input type="text" id="FirstNameSearch" placeholder="First Name" name="FirstName1"/>
</li>
<li>
<label for="LastNameSearch">
Last Name:
</label>
<input type="text" id="LastNameSearch" placeholder="Last Name" name="LastName1"/>
</li>
</ul>
<input type="submit" name="Go" value="Go" class="button"/>
</form>
</section>
</body>
</html>