Краткий ответ: одностраничный сайт-визитка может состоять из блока с приветствием, информации о владельце, услуг и контактов. Ниже — готовый пример в одном файле index.html.
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Анна Петрова — веб-дизайнер</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #202336;
background: #f6f7fb;
}
.container {
width: min(1100px, calc(100% - 40px));
margin: 0 auto;
}
.header {
position: sticky;
top: 0;
z-index: 10;
background: white;
border-bottom: 1px solid #e5e7ef;
}
.nav {
display: flex;
justify-content: space-between;
align-items: center;
min-height: 70px;
}
.logo {
color: #6c63ff;
font-size: 24px;
font-weight: bold;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 25px;
}
.nav-links a {
color: #202336;
text-decoration: none;
}
.nav-links a:hover {
color: #6c63ff;
}
.hero {
padding: 100px 0;
background: linear-gradient(135deg, #eef0ff, #ffffff);
}
.hero-grid {
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 60px;
align-items: center;
}
.tag {
margin-bottom: 15px;
color: #6c63ff;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
}
h1 {
max-width: 650px;
margin-bottom: 20px;
font-size: clamp(36px, 6vw, 64px);
line-height: 1.1;
}
.lead {
max-width: 600px;
margin-bottom: 30px;
color: #626779;
font-size: 18px;
}
.button {
display: inline-block;
padding: 13px 22px;
border-radius: 10px;
color: white;
background: #6c63ff;
text-decoration: none;
font-weight: bold;
}
.button:hover {
background: #554de0;
}
.profile-card {
padding: 40px;
border-radius: 25px;
text-align: center;
background: white;
box-shadow: 0 15px 40px rgba(39, 43, eighty, 0.12);
}
.avatar {
display: grid;
place-items: center;
width: 150px;
height: 150px;
margin: 0 auto 20px;
border-radius: 50%;
color: white;
background: #6c63ff;
font-size: 44px;
font-weight: bold;
}
.section {
padding: 85px 0;
}
.section h2 {
margin-bottom: 20px;
font-size: 36px;
}
.section-text {
max-width: 700px;
color: #626779;
}
.cards {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-top: 35px;
}
.card {
padding: 25px;
border-radius: 16px;
background: white;
box-shadow: 0 8px 25px rgba(39, 43, 80, 0.08);
}
.card h3 {
margin-bottom: 10px;
color: #6c63ff;
}
.contacts {
color: white;
background: #202336;
}
.contacts .section-text {
color: #d8daea;
}
.contact-list {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-top: 25px;
}
.contact-list a {
color: white;
text-decoration: none;
}
.contact-list a:hover {
color: #aaa4ff;
}
footer {
padding: 25px 0;
color: #626779;
text-align: center;
background: white;
}
@media (max-width: 700px) {
.nav {
flex-direction: column;
gap: 12px;
padding: 15px 0;
}
.nav-links {
gap: 12px;
font-size: 14px;
}
.hero {
padding: 65px 0;
}
.hero-grid,
.cards {
grid-template-columns: 1fr;
}
.profile-card {
padding: 30px;
}
}
</style>
</head>
<body>
<header class="header">
<div class="container nav">
<a class="logo" href="#home">AP</a>
<nav class="nav-links">
<a href="#about">Обо мне</a>
<a href="#services">Услуги</a>
<a href="#contacts">Контакты</a>
</nav>
</div>
</header>
<main>
<section id="home" class="hero">
<div class="container hero-grid">
<div>
<p class="tag">Веб-дизайнер</p>
<h1>Создаю понятные и красивые сайты</h1>
<p class="lead">
Помогаю специалистам и небольшим компаниям представить
свои услуги в интернете.
</p>
<a class="button" href="#contacts">
Обсудить проект
</a>
</div>
<div class="profile-card">
<div class="avatar">AP</div>
<h2>Анна Петрова</h2>
<p>Дизайнер и разработчик сайтов</p>
</div>
</div>
</section>
<section id="about" class="section">
<div class="container">
<h2>Обо мне</h2>
<p class="section-text">
Я создаю современные одностраничные сайты, которые помогают
рассказать о человеке, компании или проекте.
</p>
</div>
</section>
<section id="services" class="section">
<div class="container">
<h2>Что я делаю</h2>
<div class="cards">
<article class="card">
<h3>Дизайн</h3>
<p>Подбираю цвета, шрифты и расположение элементов.</p>
</article>
<article class="card">
<h3>Вёрстка</h3>
<p>Создаю страницы на HTML и CSS.</p>
</article>
<article class="card">
<h3>Адаптация</h3>
<p>Делаю сайт удобным для компьютеров и телефонов.</p>
</article>
</div>
</div>
</section>
<section id="contacts" class="section contacts">
<div class="container">
<h2>Контакты</h2>
<p class="section-text">
Напишите мне, чтобы обсудить ваш проект.
</p>
<div class="contact-list">
<a href="mailto:anna@example.com">
anna@example.com
</a>
<a href="tel:+79991234567">
+7 999 123-45-67
</a>
</div>
</div>
</section>
</main>
<footer>
© 2025 Анна Петрова
</footer>
</body>
</html>
Как это работает
HTML создаёт структуру страницы:
header— верхнее меню;section— отдельные блоки сайта;footer— нижняя часть страницы.
Ссылки меню ведут к нужным блокам:
<a href="#about">Обо мне</a>Ссылка с
#aboutоткрывает элемент:<section id="about">CSS отвечает за внешний вид: цвета, размеры, отступы и расположение элементов.
Медиазапрос:
@media (max-width: 700px)перестраивает сайт для телефона.
Проверка результата
- Сохрани код в файл
index.html. - Открой файл в браузере.
- Нажми пункты меню — они должны прокручивать страницу к разделам.
- Уменьши окно браузера — карточки должны расположиться вертикально.
- Нажми на email или номер телефона — должны открыться соответствующие приложения.
В коде можно заменить имя, профессию, описание, email и телефон на свои данные.
Обрати внимание: в строке box-shadow должна использоваться корректная запись:
box-shadow: 0 15px 40px rgba(39, 43, 80, 0.12);
