国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

HTML+CSS Easy to get started with basic HTML tags (2)

Hyperlink

##Format: <a href=''></a>

The following example:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<body>
		<a href="php.cn">php中文網(wǎng)</a>
</body>
</html>

Note: href is an indispensable attribute of a tag href="the place to link to", such as Baidu, Taobao, etc.

What is an empty link?

To write an empty link, use the # key.

The code is as follows:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<body>
		<a href="#">php中文網(wǎng)</a>
</body>
</html>

In this way, there will be no response when we click on the link.

How to use css style tags

<style></style>

Note: The style tag is Written in the header file, the code is as follows

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<style type="text/css">
			/*寫入css樣式*/
	</style>
</head>
<body>
		歡迎來到php中文網(wǎng)
</body>
</html>

Note: The type attribute is required and defines the content of the style element. The only possible value is "text/css".

The same goes for writing script code:

As shown in the following code

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<script type="text/javascript">
			//寫入腳本代碼
	</script>
</head>
<body>
		歡迎來到php中文網(wǎng)
</body>
</html>

The type attribute specifies the type of script

Image tag

<img> tag The following code is shown:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<body>
		歡迎來到php中文網(wǎng)
		<img src="images/1.jpg">
</body>
</html>

If this picture exists, we will display it


Introducing external styles or scripts

Introducing external styles, for example, I create a style.css file, my current page will use the style in the style.css file

as shown in the following code:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
		歡迎來到php中文網(wǎng)
</body>
</html>

In this way we have introduced the style

Introducing foreign script files

The following code is shown:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<script type="text/javascript" src="index.js"></script>
</head>
<body>
		歡迎來到php中文網(wǎng)
</body>
</html>


Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> /*寫入css樣式*/ </style> </head> <body> 歡迎來到php中文網(wǎng) </body> </html>
submitReset Code