Home  >  Article  >  Web Front-end  >  Is html a picture?

Is html a picture?

藏色散人
藏色散人Original
2021-04-29 11:02:171931browse

html is not a picture, html refers to hypertext markup language, which includes a series of tags through which the document format on the network can be unified and scattered Internet resources can be connected into a logical whole.

Is html a picture?

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

Is html a picture?

html is not a picture. HTML stands for Hypertext Markup Language and is a markup language. It includes a series of tags. These tags can unify the document format on the network and connect scattered Internet resources into a logical whole. HTML text is descriptive text composed of HTML commands. HTML commands can describe text, graphics, animations, sounds, tables, links, etc.

Related introduction:

By using HTML, images can be displayed in documents.

Image tag (a1f02c36ba31691bcfe87b2722de723b) and source attribute (Src)

In HTML, images are defined by the a1f02c36ba31691bcfe87b2722de723b tag.

a1f02c36ba31691bcfe87b2722de723b is an empty tag, which means that it only contains attributes and has no closing tag.

To display an image on the page, you need to use the source attribute (src). src refers to "source". The value of the source attribute is the URL address of the image.

The syntax for defining images is:

<img src="url" />

URL refers to the location where the image is stored. If an image named "boat.gif" is located in the images directory of www.w3school.com.cn, its URL is http://www.w3school.com.cn/images/boat.gif.

The browser displays the image in the document where the image tag appears. If you place an image tag between two paragraphs, the browser will display the first paragraph first, then the image, and finally the second paragraph.

Replacement text attribute (Alt)

The alt attribute is used to define a string of prepared replaceable text for the image. The value of the replacement text attribute is user-defined.

<img src="boat.gif" alt="Big Boat">

When the browser cannot load the image, the replacement text attribute tells readers the information they lost. At this point, the browser will display this alternative text instead of the image. It's a good practice to add the alt text attribute to all images on the page. This helps display information better and is very useful for those who use text-only browsers.

For more detailed HTML/CSS knowledge, please visit the HTML video tutorial column!

The above is the detailed content of Is html a picture?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:What does html mean?Next article:What does html mean?