What are HTML Tags?
Tags are the fundamental building blocks of HTML. They define the structure and give meaning to the content on a web page.
Tags & Attributes: The Building Blocks
HTML content is structured using tags, which are like labels for your content. Attributes are extra bits of information for those tags. Let's see how they work together!
Practice Zone
Now, try these exercises to test your knowledge of tags and attributes.
What is a Tag?
Tags are the fundamental building blocks of HTML. They define the structure and content of a web page. Each tag has a specific function, such as creating a paragraph (<p>
), a heading (<h1>
), or a link (<a>
). Most tags consist of an opening tag and a closing tag.
What is an Attribute?
Attributes are additional properties added to an HTML tag to provide more information about the element. They are always specified in the opening tag. For example, in <img src="image.jpg" alt="A description">
, src
and alt
are attributes that define the image source and its alternative text.
Interactive Test 1: Drag & Drop
Arrastra en el orden correspondiente.
Arrastra las opciones:
Completa el código:
Interactive Test 2: Fill in the Blanks
Rellena los huecos en cada casilla.
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <p></p> <a ="https://example.com">Visit us!</a> </body> </html>
Practice Example: Code Editor
Practice creating a paragraph tag with the text "Hello World".