Home >Web Front-end >HTML Tutorial >How to learn HTML quickly

How to learn HTML quickly

迷茫
迷茫Original
2017-01-16 14:16:562262browse

How to learn html quickly?

First we need to know what Html is, the full English name is
HyperText Markup Language

We usually call it hypertext markup language

see Here, I believe that everyone must be confused about hypertext markup language again. Markup language is illogical, so it is very simple to learn.

Let’s take a look at the basic structure of Html

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>

The tags in Html all appear in pairs, which we call the start tag and the end tag. Let’s explain the above code

8b05045a5be5764f313ed5b9168a17e6 Declares that the document is of html type

Head tag, we usually call it the head tag, in which we usually put coding, web page title, or external css style file, script Files and more!

Let’s take a look at how to write these things

(1) Set encoding

<meta charset=”utf-8”>

(2) Set web page title

<title>php中文网</title>

(3 ) Introducing external styles

<link rel="stylesheet" type="text/css" href="">

(4) Introducing external js files

<script type="text/javascript" src="demo.js"></script>

In fact, these contents are fixed. HTML has some built-in styles, such as font, etc., but these are not satisfactory at all. The needs of web pages, so I will share with you how to master the basic knowledge of css. Let’s take a look at how to develop the layout of a web page. There are two ways

One is a table, which is older, but relatively simple. The other is a div to lay out. For beginners, I don’t want to use DW. , dw is a visual operation, and I feel that I rarely write code, which is not conducive to development, so we can use other compilers to write the code purely by hand. Programming is like this. The more you write, the more you will naturally remember it. Let's take a look at the table layout. The code of the table table row tr. When talking about rows, everyone must think of columns. In tables, columns are not standardized. We call them cells, which is td

us Take a look at the following example

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="1" width="300" height="100">
<tr>
<th>姓名</th>
<th>籍贯</th>
<th>年龄</th>
</tr>
<tr>
<td>张明</td>
<td>湖北</td>
<td>23</td>
</tr>
</table>
</body>
</html>

cellspacing="0" cellpadding="0" If these two sentences are not written, then there will be gaps in the border lines between our cells. Friends, you can Test it out!

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
Previous article:Summary of Html knowledgeNext article:Summary of Html knowledge