Top 10 HTML Code Tips
Top 10 HTML Code Tips
<header>
<h1>Header</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
<h2>Main Content</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing
elit.</p>
</main>
<footer>
<p>Footer</p>
</footer>
<style>
h1 {
font-size: 36px;
color: blue;
text-align: center;
}
p {
font-size: 18px;
color: green;
text-align: justify;
}
</style>
<h1>Header</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing
elit.</p>
<table>
<form>
<style>
/* Define a CSS class */
.highlight {
background-color: yellow;
font-weight: bold;
}
/* Define a CSS ID */
#header {
background-color: lightgray;
padding: 20px;
text-align: center;
}
</style>
<body>
<div id="header">
<h1>Welcome to my website</h1>
<style>
.container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
}
.item {
background-color: lightblue;
padding: 20px;
text-align: center;