DEV Community

Cover image for Getting started with HTML (HyperText Markup Language)
Abhay Bhagat
Abhay Bhagat

Posted on • Edited on

Getting started with HTML (HyperText Markup Language)

HTML

🌐 HTML

🧱 What is HTML?• HTML (HyperText Markup Language) is the standard language for creating web pages.• It structures content using elements and tags.

🏗️ Basic Structure of an HTML

Page<!DOCTYPE html><html>  <head>    <title>Page Title</title>  </head>  <body>    <h1>This is a Heading</h1>    <p>This is a paragraph.</p>  </body></html>
Enter fullscreen mode Exit fullscreen mode

🖼️ Example: Image and Link

<a href="https://example.com">Visit Example</a> <img src="image.jpg" alt="Image description" width="300"> 
Enter fullscreen mode Exit fullscreen mode

🧩 Forms

<form action="/submit" method="post"> <input type="text" name="username"> <input type="submit" value="Submit"> </form> 🎨 Inline Formatting Tags• <strong>: Bold text• <em>: Italic text• <u>: Underlined• <code>: Code snippet• <mark>: Highlighted
Enter fullscreen mode Exit fullscreen mode

🧠 Best Practices

  • Always use <!DOCTYPE html> at the top.
  • Use semantic tags like , , , and .
  • Keep code readable and properly indented.
  • Close all tags unless self-closing (, , etc.) @devsyncin

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.