Div and Span in HTML in Hindi | Div and Span Tag | Div and Span Elements | HTML
<html>
<body>
<p>Sample<span style="color:#FF0002;">
<i>Welcome</span></i>
Welcome My Domain</p>
<p><span style="color:#8865ff;">
Welcome to My Domain</span></p>
</body>
</htm
<html>
<head>
<style>
div.sample {width:150px;background:#FF0002;border:2px dotted black;padding:7px;}
div.sample ul {color:green;}
</style>
</head>
<body>
<div class="sample">
<p>Samplep>
<ul>
<li>Home</li>
<li>Aboutus</li>
<li>Contactus</li>
</ul>
</div>
</body>
</html
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.header {
padding: 0 70px;
display: flex;
align-content: center;
justify-content: space-between;
margin-top: 20px;
margin-bottom: 20px;
color: crimson;
}
.nav {
display: flex;
align-content: center;
justify-content: center;
gap: 60px;
list-style-type: none;
}
.nav li a {
text-decoration: none;
font-size: 1.2rem;
color: crimson;
}
</style>
<div class="header">
<h2 class="logo">freeCodeCamp</h2>
<ul class="nav">
<li><a href="">Home</a></li>
<li><a href="">About</a></li>
<li><a href="">Serices</a></li>
<li><a href="">Contact</a></li>
</ul>
</div>
<style>
body {
display: flex;
align-items: center;
justify-content: center;
max-width: 900px;
margin: 0 auto;
height: 100vh;
}
p {
font-size: 2.5rem;
}
.font-style {
font-style: italic;
}
.crimson {
color: crimson;
}
.indigo {
color: indigo;
}
.orange {
color: orange;
}
</style>
<p>
This is a <span class="crimson">crimson text</span> within black texts.
This is an <span class="indigo">indigo text</span> within others, and this
is an <span class="orange">orange text</span> within other texts.
</p>
https://www.freecodecamp.org/news/span-vs-div-html-tags-what-is-the-difference/
html css tag
https://cafe.daum.net/GKFDYDLF/bZhL/33
https://www.w3schools.com/html/tryit.asp?filename=tryhtml_default