HTML Basics. Creating an html page in a notepad: explanations for dummies Download a ready-made html web page on computer science
So. It's time to create something more complex than we did before, but using what we learned in previous lessons.
In this lesson of the MM course part 1 we will make a 2-page website...for example, about making money on the Internet.
First, let's decide what it will approximately look like.
We will create a “site header” at the top of the site. On the left there will be a site menu with links to other pages of the site, the rest of the space will be occupied by the content of the site.
Is the idea clear? Let's get started.
Let's launch Notepad and write our minimum set for creating a page.
Now let's write between the tags
Next we will place the tags
If you haven't forgotten, tags
To create the page frame, we will use a table, but a little more tricky than we went through in the HTML lesson about tables. We need a table in which the first row will have 1 cell, and the other row will have 2 cells, i.e. This is the table we need:
In cell 1 we will place the site header, in cell 2 there will be the site menu, and in cell 3 there will be the page content.
To make such a table, write the following code:
Those. The code for our page will be like this:
As you can see, in such a “cunning” table only 1 pair of tags is used
So. Now let's set the table dimensions. Let's make the width of the table 750 pixels. Based on the assumption that one of the site visitors can use an 800x600 pixel monitor, and viewing a wider site will be uncomfortable for him.
Let's make the table height 600 pixels
Those. The code for our page will now be like this.
Here we will have a hat
There will be a menu here
To make the boundaries of parts of the site visible, we will “fill” the menu area and the header area with color. For example, like this
Here we will have a hat
There will be a menu here
Page content will go here
Save the file under the name index.html, so that you can preview how it will look in the browser.
Now we insert the header image into our website. About, .
There will be a menu here
Page content will go here
Now let's set the exact dimensions of the table cell intended for the header. Because Our header image has a size of 750x120, then we’ll make the table cell size 750x120.
There will be a menu here
Page content will go here
SO .
Let's set the menu width to 200 pixels by adding width="200" to the corresponding tag
There will be a menu here
Page content will go here
Let's fill the background of the menu with this background. To do this, save this background with its “native” name sv11.jpg in the same directory where the page file is located.
Now let’s write the required code
There will be a menu here
Page content will go here
Now our page will look like this.
You might be wondering why the browser doesn't handle menu width 200? The menu looks wider than 200 pixels. Yes. There is a browser glitch, but everything will fall into place if you start writing text in the main section of the page. (Or you can rigidly set the width of the cell in which we will write content by adding width="550" )
To confirm this, we will add text to our site.
There will be a menu here
Now everything is almost OK... Almost, because there are some small problems. The text is displayed exactly in the middle (vertically), when the text should be located at the top of the cells.
To do this, we need to specify one more parameter in the tag
We did not go through this parameter in the lesson about tables - this is the vertical alignment parameter valign="top".
The value top means that the content will be placed at the top.
There will be a menu here
This site is dedicated to making money on the Internet. If you are a complete beginner, then this site will help guide you and tell you where and how you can make money online.
Now our page will look like this.
home
This site is dedicated to making money on the Internet. If you are a complete beginner, then this site will help guide you and tell you where and how you can make money online.
Now we need to make the menu text in the form of links. The word Home will link to the index.html page, and the word Links to the ssilki.html page, which we will create a little later.
home Links
This site is dedicated to making money on the Internet. If you are a complete beginner, then this site will help guide you and tell you where and how you can make money online.
Now our site will look like this.
It remains to make the second page of the site. In order to simplify the work, we will do this - we will save our index.html page under a different name ssilki.html, and then edit the file.
Those. on your computer you should have 2 identical pages - index.html and ssilki.html.
Now let's change the page title (between the tags
home Website about making money on the Internet MoneyMaster
This page will contain links to sites about making money on the Internet.