Skip to main content

Write Your First HTML Document | Declares the document type and version of HTML - Simple example of a basic HTML document

Write Your First HTML Document:

Here's a simple example of a basic HTML document. Copy and paste this code into a text editor (like Notepad on Windows, TextEdit on macOS, or Visual Studio Code) and save it with an `.html` file extension. You can then open it in a web browser to see the rendered output.

html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First HTML Document</title>
</head>
<body>

    <header>
        <h1>Welcome to My First HTML Document</h1>
    </header>

    <main>
        <p>This is a simple paragraph in the main content section.</p>
        <ul>
            <li>Item 1</li>
            <li>Item 2</li>
            <li>Item 3</li>
        </ul>
    </main>

    <footer>
        <p>&copy; 2023 Your Name</p>
    </footer>

</body>
</html>

Declares the document type and version of HTML - Simple example of a basic HTML document
Write Your First HTML Document

Explanation:

- `<!DOCTYPE html>`: Declares the document type and version of HTML.
- `<html lang="en">`: The root element of the HTML document. "en" denotes the language (English).
- `<head>`: Contains meta-information about the HTML document, such as character set and viewport settings.
- `<meta charset="UTF-8">`: Specifies the character encoding (UTF-8) for the document.
- `<meta name="viewport" content="width=device-width, initial-scale=1.0">`: Sets the viewport properties for responsive design.
- `<title>`: Sets the title of the HTML document (appears in the browser tab).
- `<body>`: Contains the main content of the HTML document.
- `<header>`, `<main>`, `<footer>`: Sections of the HTML document for organization.
- `<h1>`: Heading tag indicating the main heading of the document.
- `<p>`: Paragraph tag for text content.
- `<ul>` and `<li>`: Unordered list and list items.

Feel free to customize the content and experiment with additional HTML elements as you learn more about web development!

Comments

Popular posts from this blog

Biography of Manohar Joshi

Biography of Manohar Joshi: Manohar Gajanan Joshi is an Indian politician who has played a significant role in Maharashtra state politics. Born on December 2, 1937, in a middle-class family in a village called Ganeshpeth in Ratnagiri district, Maharashtra, Joshi's journey into politics was marked by his association with the Shiv Sena, a right-wing regional political party in India. Joshi's political career began in the late 1960s when he joined the Shiv Sena, which was then led by its founder, Bal Thackeray. He quickly rose through the ranks of the party due to his organizational skills, dedication, and ideological alignment with the party's principles, which advocated for the interests of the Marathi-speaking population of Maharashtra. In 1972, Manohar Joshi won his first election to the Brihanmumbai Municipal Corporation (BMC), marking the beginning of his electoral career. He served as a corporator in the BMC and later became the Mayor of Mumbai in 1976. Joshi's tenu...

Professor Cheiro Prophecies about India | 5 predictions Professor Kiro - Kiro made these amazing predictions for India

Professor Cheiro Prophecies:  Here is Kiro made these amazing predictions for India: Professor Kiro was born in November 1866 in England. At the age of 17, Kiro came to Mumbai and met astrologer Vednarayan Joshi. With his advice, he will reach the Himalayas, Kashmir, Ladakh and Varanasi. From here, he studied astrology extensively. Kiro made many predictions in his life, which we are giving you here. Cheiro, whose real name was William John Warner, was a prominent Irish astrologer and palmist who gained fame in the late 19th and early 20th centuries. He was known for his accurate predictions and was consulted by various prominent figures of his time, including Mark Twain, Oscar Wilde, and Thomas Edison. Cheiro also made some predictions related to India. Parada Kahanee One of his notable predictions about India was made in his book "Cheiro's World Predictions," published in 1926. In this book, he wrote about the possibility of India gaining independence from British...

Biography of Alexander Pope | Early Life and Literary Beginnings - Major Works and Personal Life - Later Years and Death of Alexander Pope

Biography of Alexander Pope: Alexander Pope (1688–1744) was an English poet, satirist, and critic of the Augustan period, best known for his satirical verse and his mastery of the heroic couplet.  Here is a brief biography of Alexander Pope: Early Life of Alexander Pope: 1. Birth: Alexander Pope was born on May 21, 1688, in London, England. 2. Health Challenges: Pope suffered from various health issues from an early age, including Pott's disease (a form of tuberculosis that affects the spine) which left him with a hunched back and stunted growth. Professor Cheiro Prophecies about India : Kiro made these amazing predictions for India Literary Beginnings: 1. Early Education: Pope was largely self-taught, having been denied formal education as a Catholic during a period of anti-Catholic sentiment in England. 2. Debut Poem: His first major work, "Pastorals," was published in 1709, and he gained recognition in literary circles. Parada Kahanee Major Works of Alexander Pope:...