Jul 14, 2024
HTML-CSS-course
website.html
<!DOCTYPE html>
<html>
<head></head>
<body></body>
</html>
<tagname>
</tagname>
<button>Hello</button>
<p>content</p>
Open with Google Chrome
href
for links)<a href="https://youtube.com">Link to YouTube</a>
target="_blank"
opens link in a new tabbuttons.html
file<style>
inside <head>
background-color
)red
)button { background-color: red; color: white; }
background-color
, color
, border
, height
, width
, font-size
button { background-color: red; color: white; border: none; height: 36px; width: 100px; }
.class-name { padding: 10px; margin: 10px; }
font-size
, font-family
, color
p { font-size: 14px; font-family: Arial; color: gray; }
<div>
.grid-container { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; }
.grid-item { background-color: rgba(255, 255, 255, 0.8); border: 1px solid rgba(0, 0, 0, 0.8); padding: 20px; }
.flex-container { display: flex; justify-content: space-between; }
.flex-item { flex: 1; }
static
, relative
, absolute
, fixed
.fixed-header { position: fixed; top: 0; left: 0; width: 100%; }
.absolute-element { position: absolute; top: 10px; right: 10px; }
fixed
for the headerheader { position: fixed; top: 0; left: 0; right: 0; background-color: #fff; }
.header-sections { display: flex; justify-content: space-between; }
<nav>
for semantic structurefixed
for the sidebarnav { position: fixed; top: 60px; left: 0; bottom: 0; width: 200px; background-color: #f8f8f8; }
.main-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-gap: 20px; }
.video-thumbnail { width: 100%; height: auto; }
@media (max-width: 600px) { .class { properties; } }
.tooltip { position: absolute; visibility: hidden; }
.container:hover .tooltip { visibility: visible; }
<header>
, <main>
, <nav>
)<!-- This is a sample comment -->