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.