Skip to main content Link Search Menu Expand Document (external link)

规范指南

  • 谷歌 HTML/CSS 样式指南 https://google.github.io/styleguide/htmlcssguide.html

Head 标签

多语言标记

  • x-default 表示默认
<link rel="alternate" hreflang="en" href="https://1px.run/">
<link rel="alternate" hreflang="es" href="https://1px.run/es/">
<link rel="alternate" hreflang="x-default" href="https://1px.run/">

当前文档语言

标准用法

<html lang="en">

不推荐的用法

<meta http-equiv="Content-Language" content="en">

相关链接

  • Hreflang:初学者的简易指南: https://ahrefs.com/blog/zh/hreflang-tags/
<link rel="canonical" href="https://1px.run/" />

<link rel="next" href="https://1px.run/page/2/" />

  • 相关文档
    • HTML rel Attribute:https://www.w3schools.com/tags/att_link_rel.asp

表单

Form

<form method="get" action="http://1px.run/search" target="_blank">
...
    <input type="radio" id="open" name="state" value="open" checked="checked">
    <input type="radio" id="closed" name="state" value="closed">
    <input type="text" name="q" class="search-input ant-input" placeholder="回车搜索">
</form>

# 添加 radio 时
http://1px.run/search?q=***&state=open

# 不添加 radio 时
http://1px.run/search?q=***

属性说明
methodget 或者 post
action搜索程序的网址路径
target_blank 或者其他 target设置新窗口打开或者其他方式

相关文档

demo

讨论区:

回到顶部

Copyright © 2017-2023 1px.run (像素指南) Distributed by an MIT license.