What Are HTML Tags?

Author:

What Are HTML Tags?

When a web browser sees an HTML tag, it knows what to do with the material. Tags allow a web browser to differentiate between HTML and plain text. Opening tag, content, and closing tag all make up a single HTML tag. But some HTML tags are not closed tags.

What Are HTML Tags?

An HTML tag is a particular word or letter enclosed by angle brackets, < and >. You utilize tags to build HTML components, such as sentences or links.

The HTML code is read from top to bottom and left to right by a web browser when viewed on a computer screen. HTML documents and their characteristics are created and rendered using HTML tags. The properties of HTML tags vary from one another.

A web browser must tell the difference between plain text and HTML text in an HTML file. You can use unlimited tags in your code in HTML files.

Here Are A Few Common HTML Tags And Their Uses:

  • Heading tags
    Every document has a heading. Your headings might be different sizes. The headings in HTML are h1, h2, h3, h4, h5 and h6. A line is added before and after each heading.

  • Paragraph Tags
    The p tag allows you to divide your text into paragraphs. A p tag should separate each paragraph of text.

  • Line break Tag
    Whenever you employ the <br/> element, the next line begins. You can create an empty part using this tag, with no opening or closing tags required.

    With the <br/> tag, a blank space follows each character. This gap is required for earlier browsers to render the line break, and omitting it renders an invalid XHTML line break.

  • Horizontal Lines tags
    Horizontal lines divide a document into pieces. Using this tag, you create a line from the current document position to the right margin and break it.

    Space is between the hr and the forward-slash in hr/. Older browsers will have problems rendering the horizontal line without this space, and using hr without the forward-slash character is not valid XHTML.

  • Formatting tags
    Sometimes you want your text to look exactly like the HTML content. Use the preformatted tag <pre> in these circumstances. 

Learn basic HTML for free

Want to learn some basic HTML for free? Try our 5 Day Coding Challenge. On this, you will learn more about HTML, but also the basics of CSS and JavaScript. After one hour a day, you will have built your first web page. Register now, through the form below. Alternatively, if you would like to learn more about Code Institute’s Full Stack Software Development programme, click here

Code Institute’s €250,000 Spring Scholarship Fund - Education for All

The world is full of opportunities, and with technologies advancing and AI becoming the keyword for work success, there really hasn’t been a time more suited to people who want and need to upskill for the future of work. However, many of us know that upskilling can be expensive. To combat this, Code Institute has […]

Coding the Future: Developer Spotlight - Emma Hewson

In October 2022, Emma Hewson joined Code Institute’s Level 5 Diploma in Web Application Development programme, which is run in association with Cardiff and Vale College and is funded via the Welsh Government’s Personal Learning Accounts (PLA) initiative. The course aims to equip learners in full-stack software development, preparing them to enter the digital workforce […]

The Basics of GraphQL: Understanding the Importance of GraphQL 

In the ever-evolving landscape of web development, GraphQL has emerged as a game-changer. This query language, developed by Facebook and later open-sourced, has revolutionised the way data is requested and delivered over APIs. In this article, we will delve into the fundamental concepts of GraphQL and explore why it has become a pivotal tool in […]