HTML is the basic language for building web pages. The name stands for HyperText Markup Language. It lets us define what on a page is a heading, paragraph, image, list, or link. The browser recognizes these elements and displays them correctly. HTML is the foundation on which we add CSS (for appearance) and JavaScript (for interactivity). With HTML, we can build simple static pages or more dynamic pages tailored to modern users.
An HTML document is simply a text file that can be created with a basic text editor (such as Notepad), but more advanced tools and code editors are available for professional work, such as PHPStorm, Sublime Text, or Visual Studio Code. After the files are written and saved, they can be opened with a web browser, which reads the HTML document and displays the formatted result. With HTML, we can learn the basics of web development while also offering plenty of opportunities for creativity. The main features of HTML are its simplicity and extensibility, allowing connections with various tools and language libraries. Although basic pages can be very simple, HTML also allows for complex layouts and structures, forming the backbone of today’s most advanced websites.
The <html> tag is the core of an HTML document. It serves as a container for all other HTML elements except the <!DOCTYPE> tag. Note: Within the <html> tag, we must always include a lang attribute if we want to declare the language. This tag helps search engines and browsers.
How do we write elements in an HTML document?
HTML stands for Hyper Text Markup Language, and:
| ELEMENT | DESCRIPTION | EXAMPLE |
|---|---|---|
| <!DOCTYPE html> | Defines the document as HTML5. | See example |
| <html> | Is the root element of an HTML page. | See example |
| <head> | Contains meta information about the document. | See example |
| <title> | Sets the title of the HTML document. | See example |
| <body> | Contains the visible content of the page. | See example |
| <h1> <h2> <h3> <h4> <h5> <h6> | Defines the size of a heading. | See example |
| <p> | Defines a paragraph. | See example |
| </body> | Ends the content. | See example |
| </html> | Closes the HTML document. | See example |
To create and edit HTML files, we have access to various tools that are suitable for both beginners and advanced users. Regardless of the chosen tool, it is crucial to feel comfortable while working and to have the appropriate functionalities for the quick development of web pages. Here are some of the most common tools for working with HTML:
| Notepad | An HTML document can be written in Notepad, which is part of every operating system. | See example |
|---|---|---|
| PHPStorm | The editor truly understands our code and deeply analyzes its structure while supporting all PHP language features for modern and legacy projects. It provides the best code completion, refactoring, error prevention, and more. | See example |
| VS Code | Goes beyond syntax highlighting and autocompletion with IntelliSense, which provides smart completions based on variable types, function definitions, and imported modules. | See example |
Thank you for visiting! Adding privacy policy.
© 2024 All rights reserved.
Vam je koda pomagala? Če želite podpreti moj trud pri pripravi vodičev in vzdrževanju strani, mi lahko namenite donacijo za kavo.