Computers, Software
How to create an HTML page: step-by-step instructions, technology and recommendations
Do you think how to create an HTML page? To do this, you need to spend a few hours and you will know the basics of HTML. And you can create your first page in 5 minutes.
HTML stands for HyperText Markup Language. In translation, this means "hypertext markup language". It is important to understand that HTML is not a programming language, but a website markup.
All modern browsers can recognize it. Then they display the information in a convenient form for the user, as was previously planned by the author.
In this language, special tags are used. Each tag performs its function. There are a lot of them. Ideally, you need to learn everything. But for a beginner basic knowledge is enough.
HTML Basics
Before you create an HTML page, you need to know what it's made of. In this language there are two concepts: an element and a tag.
To specify where this element starts and closes, use the opening and closing tag. It looks like this.
As you can see, the opening and closing tags differ only in "/".
The entire HTML document is a collection of these elements. There are certain requirements for the structure of the document. All page content should be between two and html> tags. When you write the code, take the habit of immediately setting the opening and closing tag.
Also remember that the structure of the HTML language has its own hierarchy. Otherwise it is called nesting. The HTML tag is the most important, because everyone else is inside it.
HTML has two children:
- ... head>;
- .. body>.
The HEAD block indicates various service information. This information is not displayed in the browser. For example, instructions for developers, for any programs, for robots and much more.
Most importantly, there is no content here.
The BODY section indicates the contents of the document that will be displayed to the user.
Learn to open and close tags at once, because there may be 10 nested elements. In addition, for convenience, it is recommended that nested tags be indented. For example, like this.
Head>
Body>
Html>
So do that equal in importance tags are at the same level, and the children are "inside". So it is much more convenient for perception and search of the necessary piece of the code. Otherwise, you can get confused. But to save space, head and body tags can be done without indenting. This is done so that everyone else does not have an unnecessary indent. All the rest is desirable to separate.
How to create a simple HTML page
To write the code you need some kind of editor. There are a lot of them. Notepad ++ and Adobe Dreamweaver are popular. You can also use a notebook.
This is how the Notepad ++ editor looks.
This is a very convenient editor and at the same time free. The above Adobe Dreamweaver is a paid one. The difference between editors intended for writing HTML code from a notebook is that special tags are highlighted. If it is not highlighted, then you wrote wrong.
To ensure that the backlight matches the language, you need to specify it in the settings.
Let's look at how to create an HTML page in Notepad. That is, we finish the technical part and then go directly to the study of tags.
How to create a web page in notepad HTML
First, open the notepad.
Then type in it what is shown in the next screenshot.
Get used to writing with your hands, not just copying. When you write with your hands, you better remember the entire tag database.
After that, click on the "Save File" menu and specify any file name, but with the extension .html.
After that, you can open the file in the browser and admire the result. Now you should understand how to create a web page in notepad HTML.
World Consortium W3C
There is an organization like W3C, which develops and implements all standards for the Internet. All browsers comply with these standards and process page layouts (codes) according to these rules.
On the official site of HTML developers, you can find a table with all the tags and rules for their use. Within the framework of this article, we consider the most basic.
Can you think about what the rules might be? All described tags have their own recommendation. There are several of them:
- Optional tag.
- Forbidden.
- Empty tag.
- Outdated
- The Lost.
Tags in HTML
Before creating an HTML page, you need to understand what should be in the service part of HEAD.
In the HEAD area, there are both mandatory and optional tags. A mandatory tag is a heading. It is indicated by
Let's move on to the BODY section. There are elements that are displayed in the browser, and there are also non-displayed ones. For example, comments are not displayed to the user. They can be used for notes or for hinting to other employees if you work in a team.
They are designated as
Everything that is between , is evaluated by the program that way. Note that you can not attach a comment tag to another comment tag. Since as soon as you open .
An example of this nesting:
the continuation of the first comment ->
The result in the browser will be the following
Continuation of the first comment ->
But the piece will not be visible. The second opening
Headings in the text
The title is indicated not only in the HEAD section with the title tag. In the context, the title should be indicated necessarily. Because only the user will see it.
Headings come in different levels. This creates a hierarchy in the text. Equivalent to the volumes, chapters, paragraphs in the books.
There are only 6 levels. The most important heading is denoted by
Header h1>. In terms of page advancement, the text in the h1 and title tags must match. Moreover, h1 from the aesthetic point of view should be only one. But this does not mean that the browser will not process the subsequent h1. They can be done as many as you want, but this is undesirable.
For subtitles use tags from h2 to h6. They are so-called the headline of the first, second, third, fourth, fifth and sixth levels. This creates the nesting of information and a subdivision into categories.
It looks like this.
Paragraph
The main text in the code needs to be formatted in the
... p> tag. It originated from the word "paragraph". Each paragraph should be formatted with a
tag, and not all in one heap. A normal line break will not be processed. All will be displayed in one line. For hyphens, you must use the
tag.
Note that the migration tag is not closed. He is single.
Consider the example of poetry.
Different tags, in addition to their "name", have their own attribute. For example, a paragraph tag has an "alignment" attribute, which is denoted by align. It can take the value left, right, center. That is, align on the left or right edge or center.
Using links
Probably, you already thought: how to create an HTML page with links? There is nothing complicated in this. Creating links to an HTML page is easy. For this, there is a special tag. It has its own mandatory attributes. The correct link looks like this:
If you do not specify the address and text, then this link will be useless or invisible to the user.
Conclusion
There are so many tags, and each has its own set of attributes. After reading this information, you had to understand how to create an HTML web page.
In order to expand your knowledge in this area, you need to read additional literature and use the official HTML tags directory that is located on the W3C website. If you do not use the periodically updated directory of language authors, it will be difficult for you to become a professional in this field.
Similar articles
Trending Now