Computers Windows Internet

Ready source code for html. An example of creating an html page in notepad

: HTML - Hypertext Markup Language (or Hypertext Markup Language).

So let's get to know him better.

First, create a file on your computer with any name and extension .html (title must be in English- for example index.html). To create such a file - create a regular Text Document ("Start" - "All Programs" - "Accessories" - "Notepad") and save ("File" - "Save As") it anywhere by entering the name and extension (it happens that when the extension is introduced, notepad still saves it as text file, but we need a web file. To do this, before saving, select the file type - "All files (*. *)").

This is not a prerequisite (since you can change the name of the first page in the server settings), but a rule of good form. The name of the first page is preferably index (index.html), since the server, when accessing it, issues a file with this name - index.

If saved correctly, the file icon should change to a browser icon (Internet Explorer by default).

Now open this file through notepad and copy this code there.

This is the first web page!

Save and open with a browser.

Congratulations, you've just created your first web page.

The text "This is the first web page!" you can change it to any other, for example, "This is my first web page !!!". save, update the browser, admire the result.

But our page doesn't have a title.

We need to fix this - we will slightly correct the code, or rather add the "Site Head" to it using tags and .</p><p> <html> <head> <title>First page This is my first web page !!!

We save, update, admire. Our page now has headers.

Description of tags.

The very first tag is (this tag is paired, i.e. the closing tag required) - it is used as a container that contains all the content of the page (text, images, etc.). Although this tag ( and) is optional, but using it speaks of good form. Therefore, I advise you to use it.

The next tag is ... This is also a paired tag ( and). This tag is not displayed on the page (except for the title), but it is required to specify additional page parameters - page description (used by search engines), keywords(used by search engines), styles, scripts, title, etc.

Tag </b>- paired tag ( <title>and) is required to specify the page title. Moreover, this tag needs to be placed only inside the tag. !

And the last, in our code, tag - ... Also a paired tag ( and

), inside which the entire visible part of the site is located, i.e. texts, pictures, links, in general, information that you want to place on the site.

In the next lesson, we will talk about the types of tags and the rule of writing them.

If you are creating a template from scratch, then you need to build on something. Considering that the HTML5 standard "strides widely across the country", in this article I will give an example of an empty HTML5 template.

In the new standard, a lot has been simplified and now the basic part looks like this:

...

New HTML5 tags

HTML5 introduces several new tags for code structure:

,