What is HTML? Explanation of the basics of Hypertext Markup Language

The hypertext markup language (HTML) is a computer language that is part of most web pages and online applications. A hypertext is a text that is used to link to other texts, while a markup language is a series of marks that tell web servers the structure and style of a document.

In this article, we’ll go over the basics of HTML, including how it works, its advantages and disadvantages, and its relationship to HTML. CSS Y javascript.

The most used HTML tags and elements

Currently, there are 142 HTML tags that allow us to . Although modern browsers no longer support some of these tags, learning the different elements available is still beneficial.

In this section we will talk about the most used HTML tags and two main elements: the block elements and the online items.

block elements

A block element occupies the full width of the page. It always starts a new line in the document. For example, an element of header will be on a separate line from an element of paragraph.

All HTML pages use these three tags:

  1. The label is the root element that defines the entire HTML document.
  2. The label contains meta information such as the title and character set of the page.
  3. The label encloses all the content that appears on the page.

Other popular block tags are:

  • header tags. These range from

    a

    where h1 is the largest size, decreasing as you go down to h6.

  • paragraph tags. All are enclosed using the tag

    .

  • List tags. They have different variations. Use the tag
      for ordered lists and

        for the unordered. Then, enclose the individual elements of the list with the tag

      • .

      online elements

      An inline element formats the internal content of block elements, for example by adding links and emphasized text. Inline elements are primarily used to format text without breaking the flow of the content.

      For example, a label displays an element in bold, while the label displays it in italics. Hyperlinks are also inline elements that use a tag and an attribute href to indicate the destination of the link:

      Click here

      How does HTML work?

      HTML is not considered a programming language, since it cannot create dynamic functionality. Instead, with HTML, web users can create and structure sections, paragraphs, and links using elements, tags, and attributes.

      Here are some of the most common uses of HTML:

      • Web development. Developers use HTML code to design the way a browser displays web page elements, such as text, hyperlinks, and media files.
      • Web browsing. Visitors can easily navigate and follow links between related pages and websites, as HTML is largely used to embed hyperlinks.
      • web documentation. HTML allows you to organize and format documents, similar to Microsoft Word.

      HTML was invented by Tim Berners-Lee, a physicist at the CERN research institute in Switzerland. He came up with the idea of ​​an Internet-based hypertext system and published the first version of HTML in 1991. Since then, each new version of the HTML language comes with new tags and attributes for markup.

      It’s also worth noting that HTML is now considered an official web standard. He maintains and develops the HTML specifications, as well as providing regular updates.

      A normal website includes several different HTML pages. For example, one homepagea Presentation page and one contact page they have different HTML files.

      HTML documents are files that end with an extension .html either .htm. The web browser reads the HTML file and displays its content so that Internet users can view it.

      All HTML pages have a series of HTML elementsmade up of a set of labels Y attributes. HTML elements are the building blocks of a web page. A tag tells the browser where an element begins and ends, while an attribute describes the characteristics of an element.

      The three main parts of an element are:

      • opening tag. Used to indicate where an item starts to take effect. This is wrapped with opening and closing brackets. For example, use the opening tag

        to create a paragraph.

      • Contents. It is the result that other users see.
      • closing tag. Same as opening, but with a forward slash before the element name. For example,

        to end a paragraph.

      The combination of these three parts will create an HTML element:

      This is how to add a paragraph in HTML.

      Another fundamental part of an HTML element is its attributewhich has two sections: a Name and a attribute value. The name identifies the additional information that the user wants to add, while the attribute value gives more specifics.

      For example, a style element that adds the color purple and typography verdana will look like this:

      This is how to add a paragraph in HTML.

      Another attribute, the class, is the most important for development and programming. The class attribute adds styling information that can work on different elements with the same class value.

      For example, we will use the same style for a header

      and a paragraph

      . The style includes the background color, text color, border, margin, and padding, under the class .important. To get the same style between

      Y

      to nothing class=’important’ after each opening tag:

      This is a title.

      This is a paragraph.

      Most elements have an opening and closing tag, but some elements don’t need closing tags to work, like empty elements. These elements do not use a closing tag because they have no content:

      Image

      This image tag has two attributes: an attribute srcthe image path, and an attribute alt, the descriptive text. However, it has no content or end tag.

      Lastly, every HTML document must begin with a declaration to inform the browser about the document type. With HTML5, the public HTML doctype declaration will be:

      HTML Evolution: What is the difference between HTML and HTML5?

      The first version of HTML consisted of 18 tags. Since then, each new version brought new tags and attributes added to the markup. The most significant update to the language so far was the introduction of HTML5 in 2014.

      The main one is that the latter supports new types of form controls. HTML5 also introduced various semantic tags that clearly describe content, such as

      ,

      Y

Loading Facebook Comments ...
Loading Disqus Comments ...