How to learn HTML quickly

迷茫
Release: 2017-01-16 14:16:56
Original
2224 people have browsed it

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>
Copy after login

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

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”>
Copy after login

(2) Set web page title

<title>php中文网</title>
Copy after login

(3 ) Introducing external styles

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

(4) Introducing external js files

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

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template