<p> Paragraph text
This is one of the most important tags in HTML. It allows you to put text on your page. The look of the text can be changed with CSS.
HTML is the basic structure of a webpage. It uses tags, like <p> or <img>, to place text, images, links, lists, and more. CSS can style HTML, and JavaScript can make it interactive.
Each box below shows the tag name, a short explanation, an example, and copyable code.
This is one of the most important tags in HTML. It allows you to put text on your page. The look of the text can be changed with CSS.
Heading tags change the size and thickness of text. It starts out at h1 and ends at h6. H1 is good for titles, h2 for section headings, h3 for subsection headings, h4 for sub-subsection headings, and so on. The look of the h tags can be changed with CSS.
The h2 tag makes text smaller than the h1 text. It is good for section titles.
The h3 tag makes smaller text but it is still bigger than paragraph text.
The div tag is a container. It does not do much by itself, but it is useful for grouping text, images, buttons, or other HTML together so you can style them with CSS. Most websites online are just a bunch of div tags.
The img tag adds an image to your page. For websites that do not allow file uploads for code, you need to make the img src a webpage. The alt text is there to describe the image if it fails to load or for screen readers.
The ul and li tags make a bullet list. The bullets for the list can be changed with CSS.
The ol and li tags make a numbered list. The list style can be changed with CSS.
The audio tag lets you add an audio player to your page. It can be tricky on websites that do not allow file uploads, such as Toyhouse and Art Fight.
The button tag creates a clickable button. The design can be changed using CSS.
Details and summary allow for a collapsable piece of text. Good if you want to hide or spoiler anything.
Peek a boo!
The b tag makes text bold.
The strong tag makes text bold. It also gives the text stronger importance.
The i tag makes text italic, which means the text leans to the side.
The em tag makes text italic. It is usually used when text needs emphasis.
The small tag makes text smaller.
The mark tag highlights text. You can change the highlight color with CSS.
This is not important.But this is! Oh it's not important again.
The ins tag underlines text.
The del tag crosses out text.
The br tag creates a line break. It moves the next part of the text onto a new line.
The hr tag creates a horizontal line. It is useful for separating sections.
The blockquote tag is used for quotes or quoted sections. Browsers usually indent it, which helps the quote look separate from the rest of the text.
And I was like, "That's what she said!"
The code tag makes text look like code by changing the font to something commonly seen in programming.
I don't know what the name of the font is but it's an easy way to change fonts without using css!
The pre tag keeps spaces and line breaks. It is good for ASCII art or text that needs a specific layout.
/\_/\ ( o.o ) > ^ <
The sub tag makes text sit lower and makes it smaller, like in Hâ‚‚O.
The sup tag makes text sit higher, like exponents.
The center tag centers text. It is old HTML, but it can be useful for simple old-web layouts.
The bdo tag reverses the direction of text. Use dir="rtl" to make it read right to left.
The marquee tag makes scrolling text. It was popular for older websites, so if you are going for that retro or y2k aesthetic then it is perfect.
The select and option tags create a dropdown menu. This can add a fun bit of interactivity to your website.
A basic HTML template for web development.