Web programming notes (3)


Hello everyone! I’m [Xiao Huang], because my last name is Huang, so I’m called Xiao Huang.
This blog is a little summary and record of your own learning and growth. If you are still interested in what I wrote, you can pay attention to my dynamics. We will learn together, grow and progress together.

The book is too thin to write as much as you want in your heart, but it is not as long as the arrival date.
The lower lips and teeth of the cup are too shallow and fragrant, but the taste is not the vicissitudes of life.
The rest of my life is too short. Drinking a glass of wine, I hope I can forget my sadness.
Since you can't look back in this life, go forward in a cool and romantic manner.
Even if the road ahead is thorny, at least there is me and gentleness.
♡♡♡♡ ♡♡♡♡♡♡ ♡♡♡♡ ♡♡♡♡♡♡


Creation time : September 14, 2020

1. HTML syntax elements:

  • Let’s review paragraphs, headings and line breaks
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>在下小黄的博客</title>
	</head>
	<body>
	<!-- HTML 语法元素 -->
	<h3>HTML 语法元素 :</h3>
	 <p>
	 1. HTML 元素以开始标签起始<br>
	 2. HTML 元素以结束标签终止<br>
	 3. 元素的内容是开始标签与结束标签之间的内容<br>
	 4. 某些 HTML 元素具有空内容(empty content)<br>
	 5. 空元素在开始标签中进行关闭(以开始标签的结束而结束)<br>
	 6. 大多数 HTML 元素可拥有属性<br>
	 </p>
	</body>
</html>

Insert picture description here

2. HTML empty elements:

 没有内容的 HTML 元素被称为空元素。空元素是在开始标签中关闭的。
	1. <br> 就是没有关闭标签的空元素(<br> 标签定义换行)。
	2. <br> 就是没有关闭标签的空元素(<br> 标签定义换行)。
 	3. 在 XHTML、XML 以及未来版本的 HTML 中,所有元素都必须被关闭。
 	4. 在开始标签中添加斜杠,比如 <br />,是关闭空元素的正确方法,HTML、XHTML 和 XML 都接受这种方式。
 	5. 即使 <br> 在所有浏览器中都是有效的,但使用 <br /> 其实是更长远的保障。

3. HTML attributes:

  • HTML elements can set attributes
  • Attributes can add additional information to the element
  • The attributes are generally described in the opening tag
  • Attributes always appear in the form of name/value pairs, such as: name="value"
HTML 链接由 <a> 标签定义。链接的地址在 href 属性中指定
<a href="https://www.csdn.net/">CSDN官网</a>

3. 1 HTML attributes commonly reference attribute values:

  • The attribute value should always be enclosed in quotation marks.

  • Double quotes are the most commonly used, but there is no problem using single quotes.

  • Remark Tip : In some individual cases, for example, the attribute value itself contains double quotes, then you must use single quotes, for example: name='John “ShotGun” Nelson'

  • HTML attribute manual


Friends who are passing by, if you think you can learn something , please give a thumbs up and let's go. Welcome to the big guys who are passing by to comment and correct your mistakes. Also welcome friends who have problems to comment and leave messages, private messages.

The attention of every small partner is my motivation to update my blog! ! !
Please search WeChat for [ Zaixiaxiaohuang ] article updates will be read as soon as possible!
Insert picture description here

Grasp the present, look to the future, come on!


Due to the limited level, there will inevitably be some inadequacies in the writing. I hope you all will give us your advice!

Guess you like

Origin blog.csdn.net/weixin_44519789/article/details/108587728