Muhammadjavohirbek Sur'atov
<!DOCTYPE html>
<html lang="uz">
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<input type="email" name="email" placeholder="Email" required>
<input type="password" name="password" placeholder="Parol" required>
<button type="submit">Profilga kirish</button>
</body>
</html>
<!DOCTYPE html>
<html lang="uz">
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<form action="login" method="POST">
<input type="email" name="email" placeholder="Email" required>
<input type="password" name="password" placeholder="Parol" required>
<button type="submit">Profilga kirish</button>
</form>
</body>
</html>
Don't Repeat Yourself
.button-1 {
display: inline-block;
padding: 10px 20px;
border-radius: 3px;
font-weight: bold;
text-decoration: none;
color: #fff;
background-color: tomato;
}
.button-2 {
display: inline-block;
padding: 10px 20px;
border-radius: 3px;
font-weight: bold;
text-decoration: none;
color: #222;
background-color: gold;
}
.button {
display: inline-block;
padding: 10px 20px;
border-radius: 3px;
font-weight: bold;
text-decoration: none;
}
.button--danger {
color: #fff;
background-color: tomato;
}
.button--warning {
color: #222;
background-color: gold;
}
p {
margin: 0;
font-size: 20px;
}
ul {
padding: 0;
margin: 0;
list-style-type: none;
}
img {
width: 400px;
}
body .container .article p:nth-child(3) span {
/* kod */
}
.article span { }
.styled-text { }
@font-face {
font-family: "Roboto";
src: url("../fonts/Roboto-Regular.woff2") format("woff2"),
url("../fonts/Roboto-Regular.woff") format("woff");
}
@font-face {
font-family: "Roboto-Bold";
src: url("../fonts/Roboto-Bold.woff2") format("woff2"),
url("../fonts/Roboto-Bold.woff") format("woff");
}
@font-face {
font-family: "Roboto-Italic";
src: url("../fonts/Roboto-Italic.woff2") format("woff2"),
url("../fonts/Roboto-Italic.woff") format("woff");
}
.sitenav { font-family: "Roboto", "Arial", sans-serif; }
.heading { font-family: "Roboto-Bold", "Arial", sans-serif; }
.article em { font-family: "Roboto-Italic", "Arial", sans-serif; }
@font-face {
font-family: "Roboto";
src: url("../fonts/Roboto-Regular.woff2") format("woff2"),
url("../fonts/Roboto-Regular.woff") format("woff");
font-style: normal;
font-weight: 400;
}
@font-face {
font-family: "Roboto";
src: url("../fonts/Roboto-Bold.woff2") format("woff2"),
url("../fonts/Roboto-Bold.woff") format("woff");
font-style: normal;
font-weight: 700;
}
@font-face {
font-family: "Roboto";
src: url("../fonts/Roboto-Italic.woff2") format("woff2"),
url("../fonts/Roboto-Italic.woff") format("woff");
font-style: italic;
font-weight: 400;
}
body { font-family: "Roboto", "Arial", sans-serif; }
.heading { font-weight: 700; }
.article em { font-style: italic; }
var productsList = document.querySelector('.products');
var product = document.createElement('div');
product.classList.add('product');
var productName = document.createElement('h3');
productName.classList.add('product__name');
productName.textContent = 'Telefon';
var productImage = document.createElement('img');
productImage.src = 'https://picsum.photos/300';
productImage.alt = 'Telefon rasmi';
productImage.classList.add('product__img');
var productPrice = document.createElement('div');
productPrice.textContent = '$300';
product.appendChild(productName);
product.appendChild(productImage);
product.appendChild(productPrice);
productsList.appendChild(product);
<template id="product-template" style="display: none;">
<div class="product">
<h3 class="product__name">Test</h3>
<img class="product__img" src="test" alt="test">
<div class="product__price">100</div>
</div>
</template>
var productsList = document.querySelector('.products');
var productTemplate = document.querySelector('#product-template');
var productClone = document.importNode(productTemplate.content, true);
var productName = productClone.querySelector('.product__name');
productName.textContent = 'Telefon';
var productImg = productClone.querySelector('.product__img');
productImg.src = 'https://picsum.photos/300';
var productPrice = productClone.querySelector('.product__price');
productPrice.textContent = '$300';
productsList.appendChild(productClone);
.block { ... }
.block__element { ... }
.block--modifier { ... }
.block__element--modifier { ... }
BEM bo'yicha tanlovchilarni yozish uchun qolip