You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -95,7 +117,7 @@ Semantic HTML elements allow meaning and structure to be determined.
95
117
96
118
The better these crawlers can understand, and the more meaning they can infer, the higher they will rank you.
97
119
98
-
A web page that is just made of `<div>` and `<span>` elements means that the only content they have to use is the text. Which is a lossy and messy process. Better to provide precise and rich elements instead.
120
+
A web page that is just made of `<div>` and `<span>` elements means that the only content they have to use is the text. Which is a subjective and messy process. Better to provide precise, meaningful elements instead.
99
121
100
122
## Headings
101
123
@@ -109,6 +131,22 @@ A web page that is just made of `<div>` and `<span>` elements means that the onl
109
131
screen.getByRole('heading');
110
132
```
111
133
134
+
## Links
135
+
136
+
```html
137
+
<p><ahref="https://en.wikipedia.org/wiki/One_Thousand_and_One_Nights">One Thousand and One Nights</a> is a collection of Middle Eastern folk tales compiled in Arabic during the <ahref="https://en.wikipedia.org/wiki/Islamic_Golden_Age">Islamic Golden Age</a>.
138
+
```
139
+
140
+
<output></output>
141
+
142
+
```javascript
143
+
screen.getByRole('link', { name:'One Thousand and One Nights' });
144
+
```
145
+
146
+
```javascript
147
+
screen.getByRole('link', { name:/islamic golden age/i });
0 commit comments