You're online now.

Hurray! you are online now.

HTML Basic

Every HTML document needs to begin with a document type declaration: <!DOCTYPE html>.
The actual HTML document begins with the <html> tag and concludes(ends) with the </html> tag.
The visible content of the HTML document is included between the <body> tag and the </body> tag.

HTML stands for Hypertext Markup Language. It is a standard markup language used for creating web pages and applications. HTML provides the basic structure and content of a web page, including headings, paragraphs, links, images, and other elements

<!-- Starter Template -->
    <!DOCTYPE html>
    <html>
    <head>
        <title>My First Web Page</title>
    </head>
    <body>
        <header>
            <h1>Welcome to my website!</h1>
        </header>
        <nav>
            <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Contact</a></li>
            </ul>
        </nav>
        <main>
            <h2>About Me</h2>
            <p>My name is John and I'm a web developer.</p>
            <img src="image.jpg" alt="My Picture">
            <p>To learn more about me, <a href="#">click here</a>.</p>
        </main>
        <footer>
            <p>&copy; 2023 John's Website</p>
        </footer>
    </body>
    </html>

The given above example, the content of the webpage is enclosed with in <html> tag. The <head> tag contains the title of the page with the help of <title> tag. Which content is displayed on the client side page. The content in <body> tag, the are the main content which show the user.

The <header> contains the heading of the page, which is displayed at the top of the page. The <nav> tag contains the list of navigation links that allow to navigate the user one page to another page. The <main> tag contains the main content(data) of the page, including the heading, paragraph, an image, and a link.

The <footer> tag contains information about the website, such as the copyright notice.

Headings in HTML

There are six types of heading tag <h1> to <h6> tags. <h1> tag is most important heading, <h6> is the least important heading.

<!-- HTML Heading -->
    <h1>Heading 1</h1>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h4>Heading 4</h4>
    <h5>Heading 5</h5>
    <h6>Heading 6</h6>

HTML Paragraph

In HTML, a paragraph is defined using the <p> tag. The opening tag <p> indicates the start of a paragraph, and the closing tag </p> indicates the end of the paragraph.

<p>This is the paragraph of the text</p>

HTML Links

HTML links are defined using the <a> tag. This is the paired tag. <a> tag takes href attribute which gives the url of navigate the user. href attribute specified the destination of the link.

Attributes are used to provide the additional information about the HTML elements.

<a href="https://www.lapmos.com">Click Here</a>
  • <!DOCTYPE html> - declares the document type of HTML.
  • <html> - begins the HTML document.
  • </html> - ends the HTML document.
  • <body> - begins the visible content of the HTML document.
  • </body> - ends the visible content of the HTML document.
  • <head> - contains the metadata of the HTML document.
  • <title> - sets the title of the HTML document.
  • <header> - defines the header of the HTML document.
  • <nav> - defines a container for navigation links.
  • <ul> - defines an unordered list.
  • <li> - defines a list item.
  • <main> - defines the main content of the HTML document.
  • <h1> to <h6> - defines headings with different levels of importance.
  • <p> - defines a paragraph.
  • <a> - defines a hyperlink.
  • href - specifies the destination of the hyperlink.
  • <img> - defines an image.
  • src - specifies the URL of the image.
  • alt - provides alternative text for the image.
  • <footer> - defines the footer of the HTML document.
🖤 0
Buy me coffee ☕

Comments

Oops!

No comments here...