Basic structure of HTML

Página 2

Basic structure of HTML

Basic structure of HTML

HTML is the markup language used to create web pages. The basic structure of HTML is composed of some fundamental tags that must be used in all pages.

Fundamental HTML tags

The fundamental HTML tags are as follows:

  • <!DOCTYPE html>: this tag tells the browser that the document is an HTML5 file;
  • <html>: this tag indicates the beginning of the HTML document;
  • <head>: this tag contains information about the document, such as the page title and metadata;
  • <meta charset="UTF-8">: this tag defines the character set used in the document, which must be UTF-8 to support special characters;
  • <title>: this tag defines the title of the page, which is displayed in the browser tab;
  • <body>: this tag contains the content of the page;
  • </html>: This tag indicates the end of the HTML document.

Basic HTML structure example

The following is an example of the basic structure of HTML:

      <!DOCTYPE html>
      <html>
        <head>
          <meta charset="UTF-8">
          <title>My web page</title>
        </head>
        <body>
          <h1>Welcome to my webpage</h1>
          <p>This is an example page created with HTML.</p>
        </body>
      </html>
    

Note that the basic structure of HTML must be respected in all web pages, and the content may vary according to the purpose of the page.

Now answer the exercise about the content:

_What is the tag used to indicate the beginning of the HTML document?

You are right! Congratulations, now go to the next page

You missed! Try again.

Next page of the Free Ebook:

3HTML tags

Earn your Certificate for this Course for Free! by downloading the Cursa app and reading the ebook there. Available on Google Play or App Store!

Get it on Google Play Get it on App Store

+ 6.5 million
students

Free and Valid
Certificate with QR Code

48 thousand free
exercises

4.8/5 rating in
app stores

Free courses in
video, audio and text