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中文网</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中文网</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中文网 </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中文网 </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中文网 <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中文网 </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中文网 </body> </html>
new file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
/*写入css样式*/
</style>
</head>
<body>
欢迎来到php中文网
</body>
</html>
Preview
Clear
- Course Recommendations
- Courseware download
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning
Let's briefly talk about starting a business in PHP
Quick introduction to web front-end development
Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things
Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]
Login verification and classic message board
Computer network knowledge collection
Quick Start Node.JS Full Version
The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]
Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)
















