HTML A Tag And Element - HTML Tutorials - W3resource
Có thể bạn quan tâm
1. HTML a element defines a hyperlink in an HTML document.
2. a element starts with <a> tag and ends with </a> tag.
3. Value of the href attribute of an a element holds the target resource of the hyperlink.
4. Text written within the <a> and </a> tags is called anchor text.
Syntax
<a href="linked_resource">Text or Image </a>Whether both start and end tags are required
Both start and end tags are required.
Can contain
HTML a element can contain inline elements except a.
Can reside within
HTML a element can reside within Block-level elements as well as inline elements except a and button.
Attributes
Attributes specific to this element
name, href, hreflang, type, rel, rev, charset.
Identifiers
id, class.
language information and text direction
lang, dir.
Title
Title.
Style
Style.
Events
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup.
Image maps
shape and coords.
Target frame information
target.
Tabbing navigation
tabindex.
Access keys
accesskey.
Example of using HTML a element
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>html-a-tag-example</title> </head> <body> <p>We are learning HTML at <a href="/index.php">w3resource.com</a></p> </body> </html>Result
View this example in a separate browser window
HTML a tag example.
Pictorial presentation
Previous: HTML td tag and element Next: HTML link tag and element
Từ khóa » Html A Element
-
: The Anchor Element - HTML: HyperText Markup Language | MDN
-
HTML Elements Reference - HTML: HyperText Markup Language
-
HTML A Tag - W3Schools
-
HTML Elements - W3Schools
-
Custom Elements V1 - Reusable Web Components
-
What Is An HTML Element? - DigitalOcean
-
What Are HTML Tags And How Do You Use Them? - FreeCodeCamp
-
HTML - Elements - Tutorialspoint
-
Links In HTML Documents - W3C
-
HTML Tags Vs Elements - Tutorial Republic
-
Link To An Element Within The Current Page [closed] - Stack Overflow
-
Learn HTML: Elements And Structure Cheatsheet | Codecademy
-
.html() | JQuery API Documentation