Home  >  Article  >  Web Front-end  >  An article teaches you basic HTML_html/css_WEB-ITnose

An article teaches you basic HTML_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:42:57987browse

HTML is the basis for learning to make web pages. Beautiful web pages and layouts are composed of some html codes. After reading this article, you can simply understand html. Write more and practice more

If you are not committed to becoming an artist, then as a developer, you can read HTML and do it when necessary. Simply modify it. Follow my ideas below to ensure that this article will help you understand HTML. Of course, during the reading process, it is best to try it yourself, so that your understanding will be deeper. Ok, let’s start: (The following symbols are all entered in English)

1. Basic rules of html

100db36a723c770d327fc0aef2ce13b1

< ;head>

b2386ffb911b14667cb8f0f91ea547a7My Page6e916e0f7d1e588d4f442bf645aedb2f

…………………………………………..

9c3bca370b5104690d9ef395f2c5f8d1

6c04bd5ca3fcae76e30b72ad730ca86d

…………………… >Almost all web pages follow this format. This is a mark that a web page must have. Each mark is placed in 6d267e5fab17ea8bc578f9e7e5e1570b and ends with 0468589710c60a96e6cf456cf4fedd26, but an ellipsis is added. A lot of mess, that's what we see.

Copy the above code to a notepad, and then save it as a.html file. It will become a web page. Give it a try

Next, open it in notepad mode and click on the cd3230a4875b2a6b39201d5419b44e6e before and after the homepage to become 17c619a2b884e8c7d98da26361b8e170Homepage5db79b134e9f6b82c0b36e0489ee08ed, save it and see the effect again?

Are they the hyperlinks we usually see online? It's just that there is no change when clicking "Home" here, because the empty connection we added is to strike while the iron is hot. We follow the previous method to create a page, save it as b.html, and then replace the "#" above with b.html. Open it, click on the home page, and it will jump to page b. (Of course, pages a and b must be in the same directory.) By now, you should understand that in fact, all functions on the web page are implemented by different tags similar to 3499910bf9dac5ae3c52d5ede7383485. When you need to do Just remember the function of these tags.

2. Web page structure

If you pay attention when surfing the Internet, web pages are actually divided into blocks, as shown in the picture

Of course, this is just a rough structure. You can also divide it into many blocks as needed. The main purpose of dividing the blocks is to modify aspects and determine their respective presentation styles.

This is mainly achieved through the dc6dce4a544fdca2df29d5ac0ea9906b16b28748ea4df4d9c2150843fecfba68 tag. Let me try adding the dc6dce4a544fdca2df29d5ac0ea9906b tag to the "Home Page":


dc6dce4a544fdca2df29d5ac0ea9906b

714211098add9aab0cbdf0fe110ef815Homepage5db79b134e9f6b82c0b36e0489ee08ed

16b28748ea4df4d9c2150843fecfba68

Save it and try opening it. What’s the effect?

Is it still the same as before the modification? Let’s add some modifications to it:

4fd56e2a2696fa508935ec5b6cb662fb

is running, and the area we marked is shown with a blue background!

You can split the web page into eight pieces by adding a lot of dc6dce4a544fdca2df29d5ac0ea9906b16b28748ea4df4d9c2150843fecfba68 blocks, haha, and then put what you want in each block.

Of course, many dc6dce4a544fdca2df29d5ac0ea9906b add . If these style settings are similar, it will be too troublesome for us to set each one. We usually put the style in another .css file (controlling the display style of each tag in the web page), and then make the call where it needs to be called. Let’s try

Create a new notepad, rename it to c.css and then open it and write:

#header{width:200px;height:100px;border-style:solid;}

and delete it in a.html

Finally, change the dc6dce4a544fdca2df29d5ac0ea9906b of a.html to 4491e45d6f8c93b3d740a42a3cd9ca89

Is the effect the same as before?

然后再</head>前加入 <strong><link rel="stylesheet" type="text/css" href="c.css" /></strong>
It’s almost like this. At this point, you should be able to “recite poetry even if you don’t know how to write poetry”. This article is mainly to let everyone have an overall understanding of html and what it is about. And Many tags are not covered. You need to find a book on web design to read it and memorize it.
也就是将c.css这个文件引入进来。将css放入单独的文件好处是:如果很多地方都引用了这个样式,我们只要修改这一个地方,就全部都变化了,不然我们得手动修改每一处,不利于后期维护。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn