Write A Html Code To Display Your Name

Introduction

  • Creating a web page starts with HTML, the backbone of the web.
  • To display text on a web page, we use the <p> tag, which stands for "paragraph."
  • Let's write a simple HTML code to display your name!

HTML Code:

HTML
<!DOCTYPE html>
<html>
<head>
<title>Your Name</title>
</head>
<body>
  <p>Your Name Here</p>
</body>
</html>

Explanation:

  • Each HTML document begins with a <!DOCTYPE html> declaration.
  • The <html> tag encloses the entire content of the web page.
  • The <head> section contains information about the page, like the title.
  • The <body> section holds the content that will be visible on the page.
  • The <p> tag encapsulates the text "Your Name Here," which you'll replace with your actual name.

Application:

  1. Replace "Your Name Here" with your name.
  2. Save the code as an HTML file (e.g., "myname.html").
  3. Open the HTML file in a web browser to see your name displayed.

Conclusion:

  • This simple example demonstrates the fundamental concept of displaying text in HTML.
  • HTML provides a variety of tags to structure and format content on web pages.
  • Exploring these tags is the first step toward building more complex and engaging web experiences.

Post a Comment

0 Comments