📄

How to Create a Basic HTML Page

HTML/CSSBeginner

Structure a web page with HTML elements.

Code Example

HTML/CSS
<!DOCTYPE html>
<html>
<head>
  <title>My First Page</title>
  <style>
    body { font-family: Arial, sans-serif; max-width: 600px; margin: 40px auto; padding: 20px; }
    h1 { color: #2563eb; }
    p { line-height: 1.6; color: #374151; }
  </style>
</head>
<body>
  <h1>Hello, World!</h1>
  <p>This is my first HTML page.</p>
  <p>HTML uses <strong>tags</strong> to structure content.</p>
  <ul>
    <li>Item one</li>
    <li>Item two</li>
    <li>Item three</li>
  </ul>
</body>
</html>

Explanation

HTML pages start with <!DOCTYPE html>. Use tags like <h1>, <p>, <ul> to structure content. CSS styles go in <style> tags.

Related Tutorials