URLs in img elements

When you're including an image that's served from the same domain as your page, use a site-root-relative URL (starting with "/") in the src attribute of your <img> element:

<img src="/shared/images/arrow-24.png">

Use the above URL format (starting from the site root) even if the image is in the same directory as the page that includes it.

Note: There are many valid linking styles; this guideline isn't a general statement about best practices for URLs in all contexts, it's just our house style.

发送以下问题的反馈:

此网页
Google Developer Documentation Style Guide
Google Developer Documentation Style Guide