home about me html css projects blog

html cheatsheet



plain text and images

This is some text

<p></p>

This is your basic text element. You'll use it the most for displaying words and sentences on your webpage. This is your basic text element. You'll use it the most for displaying words and sentences on your webpage.

Example:
<p>This is some text</p>

This is some text

<h1></h1>

This makes things into header text. As the name suggests, headers are used to make big text for titles and headers.

Example:
<h1>This is some text</h1>

This is some text

<h2></h2>

This makes subheader text. It's helpful when you want to make text for something thats big, but not as big as the title.

Example:
<h2>This is some text</h2>

This is some text

<h3></h3>

For when you need text that's bigger than normal but smaller than a subtitle, you can use <h3></h3>!

Example:
<h3>This is some text</h3>

<img>

In order to show an image, you don't need tags on either side, just one <img> tag. You will however, need a source to your image, which is provided in the "src = " part of the tag.

Example:
<img src="/images/sumikkogurashi.jpg">

linking elsewhere

<a href=""></a>

If you need to link to another page on your website or to another site, you'll use this to do that. The site you want to go to link to is in the "href" part of the tag, and the text that the user clicks on is in

Example:
<a href="https://en.wikipedia.org/wiki/HTML">This is a link</p>

<a href=""><img></a>

Fun fact, you can nest images into <a></a> tags! If you do this, you'll end up with a clickable image!

Example:
<a href="https://en.wikipedia.org/wiki/HTML"><img src="/images/sumikkogurashi.jpg"></p>