Reference
Headings & Text
<h1>Big Heading</h1>
<h3>Smaller Heading</h3>
<p>A paragraph of text.</p>
h1 is the largest heading, h6 the smallest. p is for paragraphs.
Links
<a href="https://example.com">
Click here
</a>
The href attribute sets where the link goes.
Images
<img
src="https://placehold.co/300x200"
alt="placeholder"
>
src is the image URL, alt describes it.
Lists
<ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ul>
ul = bullet list, ol = numbered list.
Styling
<p style="color: tomato;
font-size: 24px;">
Styled text!
</p>
The style attribute adds CSS to any element.
Buttons
<button onclick="alert('Hi!')">
Click Me
</button>
onclick runs JavaScript when clicked.
Full Example
<div style="font-family: Arial;
max-width: 400px;
margin: 20px auto;">
<h1>My Site</h1>
<p>Welcome!</p>
<ul>
<li>About</li>
<li>Contact</li>
</ul>
<img src="https://placehold.co/400x150">
</div>
Combine elements into a mini page.
Code
Preview