basic HTML code:

 <!DOCTYPE html>

<html>

<head>

  <title>My First HTML Page</title>

</head>

<body>

  <h1>This is my first HTML heading</h1>

  <p>This is my first HTML paragraph.</p>

</body>

</html>

This code will create a simple web page with a heading and a paragraph. The heading will be displayed in large, bold text, and the paragraph will be displayed in normal text.

Here is a breakdown of the code:

  • The <!DOCTYPE html> declaration tells the web browser that this is an HTML document.
  • The <html> tag marks the beginning of the HTML document.
  • The <head> tag marks the beginning of the head section of the HTML document. The head section contains information about the document, such as the title.
  • The <title> tag defines the title of the document.
  • The </head> tag marks the end of the head section.
  • The <body> tag marks the beginning of the body section of the HTML document. The body section contains the content of the document, such as text, images, and links.
  • The <h1> tag defines a heading. The h1 tag is used for the most important heading on a page.
  • The This is my first HTML heading text is the content of the heading.
  • The </h1> tag marks the end of the heading.
  • The <p> tag defines a paragraph.
  • The This is my first HTML paragraph. text is the content of the paragraph.
  • The </p> tag marks the end of the paragraph.
  • The </body> tag marks the end of the body section.
  • The </html> tag marks the end of the HTML document.

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
SUBSCRIBE FOR REGULAR UPDATES
Loading...