Sigma
Sigma
html
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
These are essential to memorize because you’ll use them all the time:
Tag Purpose
<p> Paragraph
<div> Division/section
Attributes give extra information about tags. Memorize these common ones:
✅ Correct:
html
❌ Incorrect:
html
<p><strong>This is wrong.</p></strong>
🧠 💡 5. HTML Comments
html
To put a box inside your webpage and make it move, you can use HTML + CSS + animation
(using keyframes or JavaScript). Here's how you can do it step by step:
html
<!DOCTYPE html>
<html>
<head>
<title>Moving Box</title>
<style>
.box {
width: 100px;
height: 100px;
background-color: red;
@keyframes moveBox {
to { left: 300px; }
</style>
</head>
<body>
</body>
</html>
🔍 Explanation:
• position: relative; lets the box move from its starting point.
o It takes 3 seconds
css
@keyframes moveBox {
0% { left: 0; top: 0; }
html
<!DOCTYPE html>
<html>
<head>
<style>
.moving-text {
position: relative;
font-size: 24px;
color: blue;
@keyframes slideText {
0% { left: 100%; }
</style>
</head>
<body>
</body>
</html>
🧠 Explanation:
html
<style>
.hover-move {
display: inline-block;
.hover-move:hover {
</style>
css
@keyframes moveDown {
to { top: 200px; }
Html
<!DOCTYPE html>
<html>
<head>
<title>Moving Title</title>
<style>
h1 {
position: relative;
color: darkblue;
font-size: 36px;
@keyframes moveTitle {
0% { left: 0; }
100% { left: 0; }
p{
font-size: 20px;
color: black;
</style>
</head>
<body>
</body>
</html>
🔍 Explanation:
• The body and <p> elements are not animated, so they stay in place.
html
<!DOCTYPE html>
<html>
<head>
<title>Bouncing Title</title>
<style>
h1 {
font-size: 40px;
color: darkred;
text-align: center;
position: relative;
@keyframes bounce {
0%, 100% {
top: 0;
animation-timing-function: ease-in;
50% {
animation-timing-function: ease-out;
p{
text-align: center;
font-size: 18px;
color: black;
}
</style>
</head>
<body>
<h1>Bouncy Title!</h1>
</body>
</html>
🔍 How It Works:
• ease-in and ease-out simulate gravity — making it look more natural like a real bounce.
css
CopyEdit
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
/* BOUNCING TITLE */
h1 {
font-size: 40px;
color: darkred;
text-align: center;
position: relative;
@keyframes bounce {
0%, 100% {
top: 0;
animation-timing-function: ease-in;
50% {
top: -30px;
animation-timing-function: ease-out;
/* MOVING BOX */
.box {
width: 100px;
height: 100px;
background-color: steelblue;
position: relative;
@keyframes moveBox {
to { left: 300px; }
/* SCROLLING TEXT */
.scroll-text {
position: relative;
white-space: nowrap;
font-size: 20px;
color: darkgreen;
text-align: center;
margin-top: 20px;
@keyframes scroll {
0% { left: 100%; }
/* BODY TEXT */
.body-text {
text-align: center;
margin-top: 40px;
font-size: 18px;
color: #333;
</style>
</head>
<body>
<div class="box"></div>
<!-- SCROLLING TEXT -->
<div class="body-text">
<p>The title bounces, the box moves, and the text scrolls!</p>
</div>
</body>
</html>
📋 Lists
🧱 Containers
html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>Welcome!</h1>
<hr>
<ul>
<li>Learn HTML</li>
<li>Practice coding</li>
</ul>
</html>