HTML Attributes
When including additional information about HTML elements, you should use attributes. Attributes are specified within an opening tag, usually in the form of name="value"
.
For example, to embed an image, use the <img>
tag with the src
attribute. The value of this attribute should be the URL of the image.
Here is an example:
html<img src="https://codefinity-content-media.s3.eu-west-1.amazonaws.com/35fdd0a9-2b4b-4032-9ac4-3d848aa08650/dark-logo.svg" />
This code will display the specified image. Note that the <img>
tag is self-closing, meaning it doesn't require a closing tag.
Another commonly used tag that always includes an attribute is the <a>
(anchor) tag. It is used to create hyperlinks, and you must specify the link destination within the href
attribute. For example:
html<a href="https://codefinity-content-media.s3.eu-west-1.amazonaws.com/35fdd0a9-2b4b-4032-9ac4-3d848aa08650/test_page.html" target="_blank">Test page</a>
Will return a link to the Test page.
The target
parameter is set to '_blank'
, ensuring that clicking the link opens the page in a new tab.
¡Gracias por tus comentarios!
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla