HTML (Hyper Text Markup Language) is the standard language used to create and design webpages.
It structures content using elements (tags), which browsers interpret to display text, images, links, and more.
<p>
, <h1>
, <img>
.<img src="image.jpg" alt="Sample">
.Important elements:
<h1>
to <h6>
<p>
<a>
<img>
<ul>
, <ol>
, <li>
<div>
<form>
CSS (Cascading Style Sheets) styles HTML content.
Ways to use CSS:
<p style="color:red;">Text</p>
<style> p { color: red; } </style>
<link rel="stylesheet" href="style.css">
<a>
tag:href
: destination URLtarget="_blank"
: opens link in new tab<a href="https://example.com">Visit Example</a>
<div>
, Classes, and IDs<div>
: container element for grouping contentclass
: used for styling multiple elementsid
: unique identifier for one elementUse the <img>
tag:
src
: image path
alt
: alternative text (important for accessibility)
<img src="image.jpg" alt="Description">
Favicons are small icons shown in browser tabs.
Add in <head>
Favicons are small icons shown in browser tabs.
Add in <head>
Lists:
<ol>
<ul>
<li>
Used to display data in rows and columns:
<table>
<tr><th>Name</th><th>Age</th></tr>
<tr><td>Alice</td><td>25</td></tr>
</table>
Colors can be defined by:
red
, blue
#FF0000
rgb(255, 0, 0)
hsl(0, 100%, 50%)
Semantic elements clearly describe their meaning:
<header>
, <footer>
, <article>
, <section>
, <nav>
Forms collect user input
Common input fields:
<input type="text">
<input type="password">
<input type="email">
<input type="submit">
More input types:
text
number
range
color
date
checkbox
radio
file
Add sound/video
Use an <iframe>
A project combines everything learned:
Example: