Jul 22, 2024
<p></p>, <h1></h1>.<h1>, <h2>, etc. used for headings.<p> for paragraphs.<a> for hyperlinks.<br> for line breaks.<hr> for a horizontal line.<b>, <i>, <u>, etc.<pre> preserves spaces and line breaks.<!-- comment --> not shown in output.<!DOCTYPE html>, indicates HTML5.<html>, root element.<head>, contains metadata like title.<body>, contains visible content.index.html inside the folder for the homepage.<!DOCTYPE html>
<html>
<head>
<title>My First Website</title>
</head>
<body>
<h1>This is an H1 heading</h1>
<p>Some paragraph text.</p>
<a href="https://example.com">Link</a>
</body>
</html>
style attribute in HTML tags.<style> tags in the HTML <head>..css file using <link> in the HTML <head>.<head>
<style>
body { background-color: lightblue; }
h1 { color: navy; }
p { font-family: verdana; color: green; }
</style>
</head>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
body { background-color: lightblue; }
h1 { color: navy; }
p { font-family: verdana; color: green; }
text-align: center;.border property..classname {}#idname {}a[href='link'] {}:hover, :active, :nth-child(n).::before, ::after, ::first-letter.display: flex;.@media only screen and (max-width: 600px) {
.classname {
width: 100%;
}
}
<div class="gallery">
<a target="_blank" href="img_1.png">
<img src="img_1.png" alt="Image 1" width="600" height="400">
</a>
<div class="desc">Description</div>
</div>
<nav class="navbar">
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
@keyframes.@keyframes slidein {
from { margin-left: 100%; }
to { margin-left: 0%; }
}
#slideelem {
animation-duration: 3s;
animation-name: slidein;
}
<head>.<i class="fas fa-home"></i>
Stay tuned for more advanced topics!