Skip to main content

The Essential HTML Codes Everyone Should Know for the Web

Writing HTML code

Short answer: a handful of HTML tags cover almost everything you need to format text on the web, headings, paragraphs, bold and italic, links, images, and lists. Knowing these lets you write cleanly in blogs, forums, emails and anywhere HTML is accepted. Here are the essential codes with examples.

Text structure

<h1>Main heading</h1>
<h2>Section heading</h2>
<p>A paragraph of text.</p>
<br> (a line break)

Use one <h1> per page, then <h2> and <h3> for sections. Wrap paragraphs in <p>.

Emphasis

<strong>bold text</strong>
<em>italic text</em>

Use <strong> for bold and <em> for italic, they carry meaning (importance/emphasis), which is better than the purely visual <b> and <i>.

Links

<a href="https://example.com">Link text</a>

Add target="_blank" rel="noopener" to open in a new tab safely: <a href="..." target="_blank" rel="noopener">...</a>.

Images

<img src="image.jpg" alt="description">

Always include alt text describing the image, it helps accessibility and SEO, and shows if the image fails to load.

Lists

<ul>
  <li>Bulleted item</li>
  <li>Another item</li>
</ul>

<ol>
  <li>Numbered item</li>
  <li>Second item</li>
</ol>

The 10 essentials at a glance

TagPurpose
<h1>-<h3>Headings
<p>Paragraph
<strong> / <em>Bold / italic
<a>Link
<img>Image
<ul>/<ol>/<li>Lists
<br>Line break

The non-obvious tip: close your tags and use semantic ones

Two habits keep your HTML clean: close every tag you open (an unclosed <a> can turn your whole page into a link), and prefer semantic tags (<strong>, <em>, real headings) over purely visual ones. Semantic HTML is better for accessibility and SEO, and it makes your content render correctly everywhere HTML is accepted.

Frequently asked questions

What are the most essential HTML tags?

Headings (h1-h3), paragraphs (p), bold and italic (strong, em), links (a), images (img), and lists (ul, ol, li). These cover most web text formatting.

How do I make a link in HTML?

Use text. Add target="_blank" rel="noopener" to open it safely in a new tab.

Should I use strong or b for bold?

Use , which conveys importance and is better for accessibility and SEO than the purely visual . Same for over for italics.

What is the most common HTML mistake?

Forgetting to close a tag, an unclosed link tag, for example, can turn the rest of the page into a link. Always close what you open.

Comments

Popular posts from this blog

How to Completely Uninstall Programs on Windows (Free Tools and Tips)

Short answer: you do not need a cracked Revo Uninstaller Pro, because Revo has a capable free version and there are free open-source alternatives that remove programs completely, leftover files and registry entries included. Here is how to uninstall cleanly and why leftovers matter. Why leftovers are a problem Windows' built-in uninstaller often leaves behind folders, registry keys and startup entries. Over time these accumulate, clutter your system, and occasionally cause conflicts when you reinstall software. A dedicated uninstaller sweeps them up. Free tools that remove programs completely Revo Uninstaller Free , uninstalls the program, then scans for and removes leftover files and registry entries. The free version covers what most people need. Bulk Crap Uninstaller , free, open source, and excellent for removing many programs at once and cleaning leftovers. How to uninstall cleanly with Revo Free Open Revo and select the program. Click Uninstall; let the progra...

How to Recover Deleted Files for Free (Better Than a Cracked Tool)

Short answer: you do not need a cracked 7-Data Recovery serial, because excellent free tools like Recuva and PhotoRec recover deleted files, and the most important factor is not the software at all, it is stopping use of the drive immediately. Here is how to recover files the safe, effective way. The one rule that decides success: stop using the drive When you delete a file, the data is not erased, the space is just marked reusable. The moment you keep saving new files, you risk overwriting the deleted data permanently. So the instant you realize something is gone: stop using that drive . Do not install recovery software onto it either, download it to a different drive or USB stick. The best free recovery tools Recuva , free, friendly, great for recovering deleted documents, photos and files from Windows drives and USB sticks. PhotoRec , free and open source, extremely powerful, especially for photos and media, though its interface is basic. Windows File History / backups , ...

How to Transfer Contacts Between Phones the Easy Way (2026)

Short answer: The easiest way to move contacts is to sync them to a cloud account first. Save contacts to your Google account on Android or iCloud on iPhone, then sign in to that same account on the new phone and they appear automatically. For everything else, export a vCard (.vcf) file and import it. Every time I set up a new phone the very first thing I want back is my contacts. Years ago this meant fiddly SIM copies and desktop software. These days I almost never touch a cable. Here are the modern methods I actually use, ranked from easiest to most manual. Method 1: Google account sync (best for Android) If your contacts are saved to your Google account rather than the phone itself, switching Android phones is basically automatic. On the old phone, open Settings > Accounts > Google and confirm Contacts sync is on. Wait a minute for the sync to finish, or tap the three-dot menu and choose Sync now . On the new phone, sign in with the same Google account during setup....