Useful HTML tags you might ignore (summary)

青灯夜游
Release: 2021-02-13 08:59:56
forward
2797 people have browsed it

Useful HTML tags you might ignore (summary)

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 ahrefortargetattribute 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

Copy after login

This way you don’t have to repeat the URL prefix for each request.

There can only be oneelement in an HTML document, and it must be located within theelement.

Image map

Image map is an image with a specific clickable area and is defined through themaptag. 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 theUseful HTML tags you might ignore (summary)tag as usual, but this time using theusemapattribute .

Workplace
Copy after login

Next create atag and use thesame value as theusemapattribute in theimgtag nameattribute. This will link thetag with themaptag.

 
Copy after login

Then start creating clickable areas. We need to define how to draw each area, usually usingshapeandcoords.

 book 
Copy after login

Use theelement to define clickable areas on the image. It is added inside themapelement.

These properties include:

  • shapeis 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)
  • altis used to specify when theareaelement is Alternate text to be displayed when rendering fails
  • hrefContains a URL linking the clickable area to another page
  • coordsusing 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, leftCoordinates:

Useful HTML tags you might ignore (summary)

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, bottomcoordinates:

Useful HTML tags you might ignore (summary)

##The final result is:

Workplace  book 
Copy after login

can also be used Other shapes, but the coordinates of each shape are written differently.

For

circle, there should be the coordinates of the center of the circle, and then add the radius:

 clock 
Copy after login

Useful HTML tags you might ignore (summary)

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:

 clock 
Copy after login

Useful HTML tags you might ignore (summary)

Here are the values you need when creating a shape in HTML:

标签指定要在父元素中定义的术语。它代表“定义元素”。标签的父级包含术语的定义或解释,而术语位于内部。可以这样添加:

HTML Is the standard markup language for creating web pages.

Copy after login

也可以与结合使用:

   

HTML It's the standard markup language for creating web pages.

Copy after login

这可以增强可访问性,因为这样编写语义 HTML 可以使阅读器和浏览器在适合用户的上下文中解释页面上的内容。

也可以单独使用

CSS
Copy after login

</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

这两个标签通常会一起出现。

用作的标题。

 Useful HTML tags you might ignore (summary) 
basketball
Copy after login

这些标签也可以与代码块、视频和音频一起使用,如下所示。

代码块

  p { color: black; font-family: Helvetica, sans-serif; font-size: 1rem; } 
Copy after login

视频

Exhibit B. The Rough Copy trailer.
Copy after login

音频

An audio file
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
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 Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
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 code block
The entire area