Welcome to Your HTML & CSS Study Guide

This webpage is for beginners who want to learn basic HTML and CSS attributes with examples. Built by a student, for students.

Common HTML Attributes

Attribute Description Example
id Specifies a unique ID for an element
<p id="intro">Hello</p>
class Defines class(es) for styling multiple elements
<p class="highlight">Hi!</p>
style Inline CSS styling
<p style="color:red;">Red Text</p>
title Tooltip text on hover
<p title="Info">Hover me!</p>
alt Text shown if image fails to load
<img src="x.jpg" alt="Missing image">
href Specifies a link destination
<a href="https://example.com">Visit</a>

Basic CSS Properties

Property Description Example
color Text color
color: blue;
background-color Element background color
background-color: yellow;
font-size Text size
font-size: 20px;
margin Space outside element
margin: 10px;
padding Space inside element
padding: 15px;
border Element border
border: 1px solid black;

Sample Data Table

Name Age Country
John Doe 21 Philippines
Ana Cruz 18 Japan

🖼 Image Example

Sample Image