You are not logged in. Login or Register to participate and more giveaway every night by admin

Warning: Any suspicious activity will result in an immediate ban and removal from our forum. Follow the rules and respect the community.

Reminder: New users cannot post links until they have at least 1000 posts. Please engage in discussions before sharing links.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Start html code for beginner
#1
If you're a beginner, here's a simple HTML starter code to help you understand the basics of a webpage structure:

Basic HTML Template

Code:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First Webpage</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            background-color: #f4f4f4;
            padding: 20px;
        }
        h1 {
            color: #333;
        }
    </style>
</head>
<body>
    <h1>Welcome to My First Webpage</h1>
    <p>This is a simple webpage for beginners.</p>
    <a href="https://www.w3schools.com" target="_blank">Learn More</a>
</body>
</html>

Explanation of the Code:
<!DOCTYPE html> – Declares the document as HTML5.
<html lang="en"> – Defines the language of the document.
<head> – Contains metadata like title, character set, and styles.
<meta charset="UTF-8"> – Supports special characters and emojis.
<meta name="viewport" content="width=device-width, initial-scale=1.0"> – Makes the page responsive for mobile devices.
<title> – Sets the title of the webpage (shown on the browser tab).
<style> – Defines basic CSS styles inside the head.
<body> – Contains visible content like headings, paragraphs, and links.
<h1> – A heading tag for the main title.
<p> – A paragraph for descriptive text.
<a href="URL"> – A hyperlink to another website.
Would you like help adding more features, like images, buttons, or forms? ?
Reply
  


Bookmarks

Forum Jump:


Users browsing this thread: