DEV Community

Cover image for introduction to html
tej
tej

Posted on

introduction to html

HTML, which stands for Hypertext Markup Language, is the standard language used to create and design documents on the web. It forms the backbone of most web content by structuring the content and providing a foundation for web pages. Here's a basic introduction to HTML to get you started:

~~ 1. What is HTML?

HTML is a markup language used to structure content on the web. It uses a system of tags to define elements within a web page, such as headings, paragraphs, links, images, and other types of content.

~~ 2. Basic Structure of an HTML Document

An HTML document is made up of nested elements enclosed in tags. Here's a simple example of a basic HTML document:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>My First Web Page</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <p>This is my first web page.</p>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode
  • <!DOCTYPE html>: This declaration defines the document type and version of HTML.
  • <html>: The root element that contains all other elements in the document.
  • <head>: Contains meta-information about the HTML document (e.g., title, character set).
  • <meta charset="UTF-8">: Specifies the character encoding for the document.
  • <title>: Sets the title of the document, which appears in the browser's title bar or tab.
  • <body>: Contains the content of the web page, such as headings, paragraphs, images, and links.
  • <h1>: Represents a top-level heading. HTML supports six levels of headings, from <h1> to <h6>.
  • <p>: Represents a paragraph of text.

Any thing wrong plz tell me in the comment box
thankyou

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.