What’s an HTML tag?

Print anything with Printful



HTML is a language used to display web pages. HTML tags dictate how text and images are positioned and formatted. Each HTML element has an opening and closing tag. There are many tags in HTML, including some that are depreciated. The World Wide Web Consortium (W3C) develops the standard for HTML and advises using newer tags.

Hyper Text Markup Language (HTML) is a language that can be used to tell a web browser how to display web pages. To do this, HTML tags are used to dictate how text or images should be positioned or formatted on the page. HTML tags are usually enclosed in angle brackets (). These brackets tell the browser that the text inside the bracket is HTML code, rather than text to display. Using HTML, a browser can display text and images in a variety of colors, fonts, and formatting types.

An HTML element has a certain format. First, there are the opening tags, also called start tags. Inside the angle brackets is the code or other information a Web browser needs to display the text properly. After the opening tag, the text or information affected by the code is typed and then the closing tag is inserted. Therefore, if a person wanted the word “color” to be bold, the person would enter something like this: color . This will result in text that looks like this: color.

In the example above, the opening tag is . This tells the computer that the text to follow should be bold. The closing tag is , which tells the computer that bolding should be stopped. It is important to ensure that tags are closed when writing HTML. Otherwise, following the example, a person would end up with all of the text following the opening tag in bold rather than just the text he wishes to format.

There are many tags in HTML and each one tells the browser to display text and images in different ways. In general, they are easy enough to understand. “B”, “i” and “u” stand for bold, italic and underline, respectively. Additionally, there are tags that tell the computer to insert a hyperlink, tags that allow images to be inserted, as well as tags that allow for a variety of other formatting, spacing, and other features that help make websites look like they do. It’s important to note, however, that some tags are depreciated.

Deprecated tags are tags that have been labeled obsolete by the World Wide Web Consortium (W3C), a body that develops the standard for HTML, and have been replaced by several options in more recent versions of HTML and XHTML. An example of a depreciated tag is the “u”. Since tags like this have been replaced by more convenient options, HTML authors are advised to opt-in to using the newer tags. In the example with the underline, the “style” attribute should be used. This attribute allows for various text formatting options, including underlining, coloring, fonts, and other text styles.




Protect your devices with Threat Protection by NordVPN


Skip to content