Setting up HTML ?

Setting up an HTML (Hypertext Markup Language) document involves creating the basic structure and elements of a web page. Here's a step-by-step guide on how to set up an HTML document:

1. Start with a text editor: You can use any text editor of your choice, such as Notepad, Sublime Text, Visual Studio Code, or any other code editor.

2. Make a new file: Launch your text editor, then choose "New" or "New File" from the menu. As an alternative, you may create a new file by pressing Ctrl + N on a Windows or Mac computer.

3. Start with the document type declaration: At the beginning of your HTML document, you need to specify the document type declaration, known as the doctype. This declaration informs the browser about the HTML version you are using. For HTML5, the doctype declaration is as follows:

<!DOCTYPE html>



Add the opening and closing HTML tags: Following the doctype declaration, you must add the opening html> and closing /html> tags. The HTML document's beginning and finish are indicated by these tags.

<!DOCTYPE html>
<html>
</html>



Include the head section: The "head" section and the "body" section are the two principal parts found within the "html" tags. The title, CSS stylesheets, JavaScript scripts, and other meta-data about the content are all contained in the head> section.

<!DOCTYPE html>
<html>
  <head>
    <!-- Meta tags, title, CSS and JavaScript references go here -->
  </head>
</html>



Add the title: Within the <head> section, you can include the <title> tag to specify the title of your web page. This title will be displayed in the browser's title bar or tab.

<!DOCTYPE html>
<html>
  <head>
    <title>Setting up page</title>
  </head>
</html>



Include the body section: After the <head> section, you need to add the <body> section. This is where the visible content of your web page will go, such as headings, paragraphs, images, links, etc.

<!DOCTYPE html>
<html>
  <head>
    <title>My Web Page</title>
  </head>
  <body>
    <!-- Content of the web page goes here -->
  </body>
</html>



Add content to the body: Within the <body> section, you can add various HTML elements to structure and format your content. For example, you can use <h1> to <h6> tags for headings, <p> tags for paragraphs, <img> tags for images, <a> tags for links, and so on.

<!DOCTYPE html>
<html>
  <head>
    <title>My Web Page</title>
  </head>
  <body>
    <h1>Welcome to My Web Page</h1>
    <p>This is a sample paragraph.</p>
    <img src="image.jpg" alt="Image">
    <a href="https://www.example.com">Visit Example.com</a>
  </body>
</html>



1. Save the file: Save the file with an appropriate name, giving it an .html extension. For example, you can save it as index.html if you want it to be the main page of your website.

2. Open the HTML file in a web browser: Double-click the saved HTML file, and it will open in your default web browser. You will see the rendered web page with the content you added.

All done! An HTML document you created has been successfully setup. To construct a completely functional and aesthetically pleasing website, you may keep adding new features and style to your web page using HTML and CSS.