What Is HTML? Tech Easyer
What Is HTML? Hypertext Markup Language Basics Explained
HTML stands for Hypertext Markup Language. It is an ideal markup language for creating web pages. It allows creating and structuring sections, paragraphs and links using HTML elements (the building blocks of web pages) such as tags and attributes.
Web development. Developers use HTML code to design how a browser displays web page elements such as text, hyperlinks, and media files.
Internet navigation. Users can easily navigate and insert links between related pages and websites as HTML is widely used to embed hyperlinks.
Web documentation. HTML makes it possible to organize and format documents like Microsoft Word.
It is also worth noting that HTML is not considered a programming language because it cannot create dynamic functionality. It is now considered an official web standard.This article will cover the basics of HTML, including how it works, its advantages and disadvantages, and how it relates to CSS and JavaScript.
HTML documents are files that end with the HTML or HTML extension. A web browser reads the HTML file and renders its content so that Internet users can view it.
All HTML pages consist of a series of HTML elements, consisting of a set of tags and attributes. HTML elements are the building blocks of a web page. A tag tells the web browser where an element begins and ends, whereas an attribute describes an element's properties.
The three main parts of an element are:
- Opening tag - Used to indicate where an element begins to execute. The tag is wrapped with opening and closing angle brackets. For example, use the start tag <p> to create a paragraph.
- Content - This is the output that other users see.
- Closing tag – Same as opening tag, but with a forward slash before the element name. For example, </p> to end a paragraph.
The combination of these three parts will create an HTML element:
Another important part of an HTML element is its attribute, which has two sections - a name and the attribute value. The name identifies additional information that a user wants to add, while the attribute value provides more specification.
For example, a style element adding the color purple and the font-family vardanaq would look like this:
Another feature, the HTML class, is the most important for development and programming. The class attribute adds style information that can operate on different elements with the same class value.
Block-level components
A
block-level element takes up the entire width of a page. It always
starts a new line in the document. For example, a heading element will
be on a separate line from a paragraph element.
Every HTML page uses these three tags:
- The <HTML> tag is the main element that defines the entire HTML document.
- The <HEAD> tag contains meta information such as the page title and character set.
- The <BODY> tag encloses all the content displayed on the page.
Other popular block-level tags include:
- Heading Tags – These range from <h1> to <h6>, with h1 being the largest heading in size, getting smaller as you go up to h6.
- Paragraph tags - all enclosed using the <p> tag.
- List tags - There are several variations. Use the tag for an ordered list, and for an unordered list. Then, enclose individual list items using the tag.
Inline Elements
An
inline element formats the internal content of block-level elements,
such as adding links and emphasizing strings. Inline elements are
generally used to format text without breaking the flow of content.HTML Evolution - What is the difference between HTML and HTML5?
The first version of HTML had 18 tags. Since then, each new version brings new tags and attributes added to the markup. The most significant upgrade to the language so far was the introduction of HTML5 in 2014.
Pros and Cons of HTML
Like any other computer language, HTML has strengths and limitations. Here are the pros and cons of HTML:
Benefits:
- Beginner-friendly: HTML has a clean and consistent markup, as well as a shallow learning curve.
- Support: The language is widely used, has a lot of resources and a large community behind it.
- Accessible: It is open source and completely free. HTML runs natively in all web browsers.
- steady The language is primarily used for static web pages: For dynamic functionality, you may need to use JavaScript or a back-end language such as PHP.
- Separate HTML page:Users need to create separate web pages for HTML, even if the elements are the same.