Write A Html Code To Display Your Name And Address

Introduction

  • Let's expand our simple HTML page to display more personal information, including your name and address.
  • HTML offers specific tags to structure content meaningfully, enhancing readability and organization.

 

HTML Code:

HTML
<!DOCTYPE html>
<html>
<head>
<title>Your Name and Address</title>
</head>
<body>
  <h1>Your Name</h1>
  <p>Your Street Address<br>
  Your City, State ZIP Code</p>
</body>
</html>

Explanation:

  • We've introduced the <h1> tag to create a prominent heading for your name.
  • The address is enclosed within a paragraph (<p>) tag for proper formatting.
  • The <br> tag inserts a line break within the paragraph to separate the street address from the city, state, and ZIP code.

Application:

  1. Replace placeholders like "Your Name" and "Your Street Address" with your actual details.
  2. Save the code as an HTML file.
  3. Open the file in a web browser to view your name and address.

Conclusion:

  • This example showcases how to incorporate multiple pieces of information using different HTML tags.
  • By understanding the roles of these tags, you can construct well-structured and informative web pages.
  • Continue exploring HTML's capabilities to create more diverse and engaging content!

Post a Comment

0 Comments