Recommended:html tutorial
With the increasing reliance on JavaScript frameworks and libraries, many people pay less attention to HTML. . This results in us not being able to take full advantage of many features of HTML, which can greatly enhance website functionality. Also by writing semantic HTML you can add the correct context to your website content, significantly improving the user experience.
This article will introduce some useful HTML tags that you may have overlooked. The
tag allows you to create a scenario where there is a base URL that acts as the Prefix for all relative URLs. The tag must have ahref
ortarget
attribute that contains the base URL, or both.
The base element(Google As a case study)
Gmail - Used to send emails; which are messages distributed by electronic means from one computer user to one or more recipients via a network.
Hangouts - It's used for Messaging, Voice and Video Calls
This way you don’t have to repeat the URL prefix for each request.
There can only be one
element in an HTML document, and it must be located within theelement.
Image map is an image with a specific clickable area and is defined through themap
tag. These areas are set up using thetag. This allows you to embed links in different parts of the image, which can lead to other pages, which is useful for describing what is in the image.
Look at an example:
The first step is to insert the image using thetag as usual, but this time using the
usemap
attribute .
Next create atag and use the
same value as the
usemapattribute in the
imgtag name
attribute. This will link the
tag with themap
tag.
Then start creating clickable areas. We need to define how to draw each area, usually usingshape
andcoords
.
Use theelement to define clickable areas on the image. It is added inside the
map
element.
These properties include:
shape
is required when drawing a rectangle over the relevant area. You can use other shapes such as rectangle, circle, polygon or the default shape (whole image)alt
is used to specify when thearea
element is Alternate text to be displayed when rendering failshref
Contains a URL linking the clickable area to another pagecoords
using coordinates (starting with (in pixels) to cut out shapes accurately. You can use various software to obtain the exact coordinates of an image; Microsoft's drawing software is used below as a simple example. Different shapes represent their coordinates in different ways. For example, a rectangle is represented byleft, top, right, bottom
.Here we havetop, left
Coordinates:
You can find the The lower left corner reads the coordinates of the cursor on the picture, or you can just use the ruler on the horizontal and vertical planes.
The screenshot below shows theright, bottom
coordinates:
circle, there should be the coordinates of the center of the circle, and then add the radius:
The coordinates of the center of the circle Agreeing to be located in the lower left corner, the horizontal distance from the center to the end of the circle is the radius. Creating a
polyis more like drawing freehand. You just link different points on the image and they will be connected:
和
标签指定要在父元素中定义的术语。它代表“定义元素”。标签
的父级包含术语的定义或解释,而术语位于
内部。可以这样添加:
HTML Is the standard markup language for creating web pages.
也可以与结合使用:
HTML It's the standard markup language for creating web pages.
这可以增强可访问性,因为这样编写语义 HTML 可以使阅读器和浏览器在适合用户的上下文中解释页面上的内容。
也可以单独使用:
CSS
</code> 和 <code><code></code></h2><p>预格式化的文本或 <code><pre class="brush:php;toolbar:false"></code> 标签用于在编写文本时显示文本(通常是代码)。它显示所有空格和制表符,并完全按照块中的格式进行设置。</p><pre class="xml hljs"> <pre class="brush:php;toolbar:false"> <code> p { color: black; font-family: Helvetica, sans-serif; font-size: 1rem; } </code>
Copy after login
和
这两个标签通常会一起出现。
用作
的标题。
basketball
Copy after login
这些标签也可以与代码块、视频和音频一起使用,如下所示。
代码块:
视频:
Copy after login
音频:
Copy after login
和
和
用来创建一个可切换的部分。
标签位于
标签内,单击后会自动显示和隐藏的内容。
最好用的地方是你可以用 CSS 去设置它们的样式,即使不依赖 JavaScript 也可以完美地工作。
I am an introvert
An introvert is a person with qualities of a personality type known as introversion, which means that they feel more comfortable focusing on their inner thoughts and ideas, rather than what's happening externally. They enjoy spending time with just one or two people, rather than large groups or crowds
Copy after login
和
基本上
是从另一个来源引用的部分。并添加了
属性来指示源。
The history of Nigeria can be traced to settlers trading across the middle East and Africa as early as 1100 BC. Numerous ancient African civilizations settled in the region that is known today as Nigeria, such as the Kingdom of Nri, the Benin Empire, and the Oyo Empire. Islam reached Nigeria through the Borno Empire between (1068 AD) and Hausa States around (1385 AD) during the 11th century,[1][2][3][4] while Christianity came to Nigeria in the 15th century through Augustinian and Capuchin monks from Portugal. The Songhai Empire also occupied part of the region.[5]
Copy after login
如果使用cite
属性,那么这个属性必须是指向源的有效 URL。要获得相应的引文链接,必须相对于元素的节点文档来解析属性的值。有时它们是私有的,例如调用服务器端脚本收集有关网站使用情况的统计信息。
cite
元素表示作品或知识产权的标题,例如书籍、文章、论文、诗歌、歌曲等。
The best movie ever made is The Godfather by Francis Ford Coppola . My favorite song is Monsters You Made by the Burna boy.
Copy after login
总结
我们应该更多地关注这些标记,并通过编写更多的语义代码来改善网站的功能。
更多编程相关知识,请访问:编程教学!!
The above is the detailed content of Useful HTML tags you might ignore (summary). For more information, please follow other related articles on the PHP Chinese website!
Related labels:
source:segmentfault.com
Previous article:How to write html header file css
Next article:Quickly use svg to draw beautiful animations!
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2023-04-26 17:59:18
-
2023-04-26 17:47:48
-
2023-04-26 17:41:42
-
2023-04-26 17:37:05
-
2023-04-26 17:31:25
-
2023-04-26 17:27:32
-
2023-04-25 19:57:58
-
2023-04-25 19:53:11
-
2023-04-25 19:49:11
-
2023-04-25 19:41:54
Latest Issues
Leverage VueJS components in PHP
I want to mix basic HTML generated by Php and VueJS components without having to use VueJS...
From 2023-11-11 00:01:44
0
2
288
v-date-picker to select only month and year
Please tell me if there is any other way to do this using v-date-picker. I just want the u...
From 2023-11-10 14:05:05
0
1
269
Related Topics
More>
-
About us
Disclaimer
Sitemap
-
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!
Shape
Coordinates
##rect
left, top, right , bottom
circle
center-x, center-y, radius
poly
x1, y1, x2, y2,….
default
The entire area
The code block