DEV Community

Cover image for HTML - HTML text fundamentals
Lachelle Zhang
Lachelle Zhang

Posted on • Edited on

2 1

HTML - HTML text fundamentals

HTML text fundamentals

Structure in text

One of HTML's main jobs is to give text structure so that a browser can display an HTML document the way its developer intends. We can add structure to a page of text by adding headings and paragraphs, emphasizing words, creating lists, and more.

  • <h1> - <h6> - headings
  • <p> - paragraph
  • <ul> <ol> <li> - unorderd list, ordered list, list
  • <em> - emphasis
  • <i> <b> <u> - italic, bold, underline

What is semantics HTML?

The HTML semantics refers to the tags that provide meaning to an HTML page rather than just presentation. It makes HTML more comprehensible by better defining the different sections and layout of web pages.

What are semantic elements?

A semantic element clearly describes its meaning to both the browser and the developer. Examples of non-semantic elements: <div> and <span> - Tells nothing about its content. Examples of semantic elements: <form>, <table>, and <article> - Clearly defines its content.

Why do we need semantics?

  • It makes web pages more informative and adaptable.
  • It allows browsers and search engines to better interpret content.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay