SEO fundamentals
A crawler reads the document, not a screenshot. It wants a title, text it can select, and a link it can follow. Those are the same strings you already put in the head and the body.
Your console output appears here.
The four logs are the document title, the heading, the link target, and the image alt. They were in the HTML before the script ran.
+Go deeper
The title is the result
The title element is the name a search result often shows, and each page should have its own. A meta description, written as meta name=description in the head, is the short summary under that title. It is the same head the document-structure lesson started. One h1 should describe the page topic, and it should agree with the title. The heading, the labels, and the alt text from the last lesson are the same signals a crawler reads.
Text has to be text
Words in an image do not exist as text unless the alt repeats them. and search overlap here because both need the words in the document. A such as h1 gives the words a place in the outline.
Links have to be links
An anchor with an href is a link a crawler can follow. A div that looks like a link is not. The words of the link should say where it goes. Click here says nothing about the destination.
| Source | Useful for | Invisible to a crawler |
|---|---|---|
| title | The result name | A heading that exists only as a picture |
| h1 and paragraphs | The page topic | Text drawn into a canvas |
| a href | A page to visit next | A div styled to look like a link |
| img alt | What the image is | An empty alt on a meaningful image |
| meta description | The short summary of the page | A summary that exists only in a picture |
Search and access overlap
The last lesson was about announcements. The same missing name hurts both. An image with a real alt helps a screen reader and a crawler. A title helps the tab and the result. You do not write two documents.
View source, not the paint
If view source does not contain the title, the heading, the sentence, and the href, the crawler does not have them either. The script prints four of those strings so you can see they came from elements.
Guided challenge
SEO fundamentals
The description of the image is the alt attribute, not title. Read alt so the last log is Two gulls above the harbor.
Your console output appears here.
EXPECTED CONSOLE OUTPUT
Harbor birds Harbor birds #gulls Two gulls above the harbor
Hints 0/2
Use all hints or make 3 failed runs (0/3).
Free sandbox
Edit the HTML and CSS. The JavaScript tab can read the result. This draft is saved separately.
Your console output appears here.
Quiz
A quick check for understanding. Retry as often as you like; your learning path stays open.
Ready to call this one understood?
Mark this lesson complete to earn 100 XP. You can always revisit it.