Reply to the discussion (solution)
The first two buttons the teacher made for me were fine, but the last one didn’t work = =!
Please ask God = =! Where is the great god = =!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><div id="div1" style="padding-top:500px;float:left"><a href="zhuye.html"><input type="butoon" id="butoon1" name="注册" value="注册"/></a></div><div id="div2" style="padding-top:500px;float:left"><a href="zhuye.html"><input type="butoon" id="butoon2" name="主页" value="主页" /></div><div id="div3" style="padding-top:500px "><a href="zhuye.html"><input type="butoon" id="butoon3" name="释义" value="释义"/></a></div></body></html>
Copy after login
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><div id="div1" style="padding-top:500px;float:left"><a href="zhuye.html"><button id="butoon1" name="注册">注册</button></a></div><div id="div2" style="padding-top:500px;float:left"><a href="zhuye.html"><button id="butoon2" name="主页">主页</button></a></div><div id="div3" style="padding-top:500px "><a href="zhuye.html"><button id="butoon3" name="释义"> 释义</button></a></div></body></html>
Copy after login
The above is wrong There are many problems with these few lines of code
The first float is in style There are multiple floats in style The style is separated with;
The second href is followed by no; number
The third input does not have a closing tag. You are obviously having a nesting problem
The fourth is what you said, the third will not work because the third The emergence of this problem So the first problem that caused you
The last problem is that the first two are floating, and the third one is also floating.
Why do you need to nest input in a? Please explain it.
There are a lot of grammatical errors. The tag is not closed, the float position is written incorrectly