Basic Tutorial of HTML learning 101 by Mr Santhosh kumar athaluri

Jul 8, 2023 - 22:33

HTML (Hypertext Markup Language). HTML is the standard markup language used for creating web pages. It provides the structure and content of a web page, defining how the page is organized and displayed in a web browser.

HTML uses a set of elements and tags to define the structure and formatting of the content. Let's start with the basic structure of an HTML document:

 <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> </body> </html>

Here's a breakdown of the different parts:

  • <!DOCTYPE html>: This is the doctype declaration, which specifies that the document is an HTML5 document.
  • <html>: This is the root element of an HTML document.
  • <head>: This element contains meta-information about the document, such as the title, character encoding, and links to external stylesheets or scripts.
  • <title>: This element sets the title of the web page, which appears in the browser's title bar or tab.
  • <body>: This element contains the visible content of the web page, such as headings, paragraphs, images, links, etc.

Let's add some content to the body of the HTML document. Here's an example:

<!DOCTYPE html> <html> <head> <title>My First Web Page</title> </head> <body> <h1>Welcome to My Web Page</h1> <p>This is a paragraph of text.</p> <img src="image.jpg" alt="My Image"> <a href="">Visit</a> </body> </html>

In this example, we've added a heading (<h1>), a paragraph (<p>), an image (<img>), and a link (<a>).

  • <h1>: This is a heading element. HTML provides six levels of headings (<h1> to <h6>), where <h1> is the highest level and <h6> is the lowest level.
  • <p>: This is a paragraph element. It represents a block of text.
  • <img>: This is an image element. It displays an image on the web page. The src attribute specifies the path to the image file, and the alt attribute provides alternative text for the image.
  • <a>: This is an anchor element, commonly known as a hyperlink. It creates a link to another web page or a specific location within the same page. The href attribute specifies the URL of the target page.

These are just a few basic HTML elements to get you started. HTML offers a wide range of elements for different types of content, including lists, tables, forms, and more. You can also apply CSS (Cascading Style Sheets) to style your HTML elements and make your web page visually appealing.

I hope this introduction to HTML helps you get started. Let me know if you have any specific questions or if there's anything else you'd like to learn!

What's Your Reaction?