HTML background image

1. background color and background image
first development tools used here HBuilder X, on development tools to write code

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"><!--告诉浏览器以哪种编码方式打开该文件--> 并不是设置文件的格式为utf-8字符集,而是让浏览器以utf-8打开
		<title>HTML背景颜色和格式</title>
	</head>
	<body bgcolor = "red" background = "img/1.img">
	<!--bgcolor 背景色  background 背景图片-->
	</body>
</html>

2. Picture
pictures and background images are different, one is the background, one can move things on a page

1.设置图片宽度和高度的时候,只设置宽度,高度会进行等比例缩放。
2.Img标签就是图片标签
3.src属性是图片的路径
4.width设置宽度,height设置高度
5.title是设置鼠标悬停上显示的字
6.alt 图片加载失败的时候显示的提醒信息,图片加载失败的原因可能有网速拥塞,或者在该路径下无法找到该图片

<img src="img/tiger.jpg"/ width = "100px" //可以设置宽度
title = "这是悬停提醒"	alt = "图片找不到哦"/>
		<br><br><br>
		<img src="img/tiger.jpg"/>
<开始><结束/> 如果在一个标签开始和结束中间不加东西的话可以改写为如下
<测试/>
比如:<img></img> 如果在img标签中间不加东西的话  改写为 <img/>如上图所示  

Hyperlinks
features:
underlined
the shape of a small hand hovering above is displayed in the hyperlink

href: hot reference thermal reference
href attribute must have been behind the address of a resource can be a URL, a picture
can be an absolute path, the path may be a relative, can be a network resource, it may also be local

<Target = "_blank">: New window click on the hyperlink will open a new page

<Target = "_self">: the current window (this is the default mode) will go to the linked resources from the current web page window

<Target = "_top">: top-level window

<Target = "_parent">: parent window

Hyperlink action
may send a request from the browser a hyperlink to the server
the browser sends a request (request: request)
the server transmits data (response: response) to the browser

B / S structure: are each corresponding to a response to a request
B- Request -> S
S response ----- -----> B

用户点击超链接和用户在浏览器地址栏上直接输入URL,有何区别?
		本质上没有区别,都是向服务器发送请求

从操作上来说,超链接使用更加方便
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!--以下为超链接的使用-->
		<a href = "链接的地址 如http://www.baidu.com">百度</a>
		<a href = "www.hao123/com" target = "_blank"><img src = "图片路径"/><a/>放入一个图片超链接

		
	</body>
</html>

List (understand the content)

Published 27 original articles · won praise 0 · Views 407

Guess you like

Origin blog.csdn.net/wenshao007/article/details/104428599