{"action":"created","issue":{"url":"https://api.github.com/repos/JunliuHub/blog/issues/15","repository_url":"https://api.github.com/repos/JunliuHub/blog","labels_url":"https://api.github.com/repos/JunliuHub/blog/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/JunliuHub/blog/issues/15/comments","events_url":"https://api.github.com/repos/JunliuHub/blog/issues/15/events","html_url":"https://github.com/JunliuHub/blog/issues/15","id":145461285,"number":15,"title":"HTML学习","user":{"login":"JunliuHub","id":16153489,"avatar_url":"https://avatars.githubusercontent.com/u/16153489?v=3","gravatar_id":"","url":"https://api.github.com/users/JunliuHub","html_url":"https://github.com/JunliuHub","followers_url":"https://api.github.com/users/JunliuHub/followers","following_url":"https://api.github.com/users/JunliuHub/following{/other_user}","gists_url":"https://api.github.com/users/JunliuHub/gists{/gist_id}","starred_url":"https://api.github.com/users/JunliuHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JunliuHub/subscriptions","organizations_url":"https://api.github.com/users/JunliuHub/orgs","repos_url":"https://api.github.com/users/JunliuHub/repos","events_url":"https://api.github.com/users/JunliuHub/events{/privacy}","received_events_url":"https://api.github.com/users/JunliuHub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-03T06:47:08Z","updated_at":"2016-04-07T14:36:00Z","closed_at":null,"body":"#### HTML 图像\r\nHTML 图像是通过 <img> 标签进行定义的。\r\n`<img src=\"w3school.jpg\" width=\"104\" height=\"142\" />`\r\n#### HTML 链接\r\nHTML 链接是通过 <a> 标签进行定义的。\r\n`<a href=\"http://www.w3school.com.cn\">This is a link</a>`\r\n- target 属性\r\n使用 Target 属性，你可以定义被链接的文档在何处显示。\r\n下面的这行会在新窗口打开文档：`<a href=\"http://www.w3school.com.cn/\" target=\"_blank\">Visit W3School!</a>`\r\n\r\n- 命名锚的语法：\r\n`<a name=\"label\">锚（显示在页面上的文本）</a>`\r\n提示：锚的名称可以是任何你喜欢的名字。\r\n提示：您可以使用 id 属性来替代 name 属性，命名锚同样有效。\r\n\r\n实例\r\n\r\n首先，我们在 HTML 文档中对锚进行命名（创建一个书签）：\r\n`<a name=\"tips\">基本的注意事项 - 有用的提示</a>`\r\n\r\n然后，我们在同一个文档中创建指向该锚的链接：\r\n`<a href=\"#tips\">有用的提示</a>`\r\n\r\n您也可以在其他页面中创建指向该锚的链接：\r\n`<a href=\"http://www.w3school.com.cn/html/html_links.asp#tips\">有用的提示</a>`\r\n\r\n在上面的代码中，我们将 # 符号和锚名称添加到 URL 的末端，就可以直接链接到 tips 这个命名锚了\r\n\r\n#### HTML 注释\r\n`<!-- This is a coment -->`\r\n#### HTML 折行\r\n如果您希望在不产生一个新段落的情况下进行换行（新行），请使用 <br /> 标签：\r\n`<p>This is<br />a para<br />graph with line breaks</p>`\r\n#### 样式表\r\n- ##### 外部样式表\r\n`<head>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"mystyle.css\">\r\n</head>`\r\n\r\n- ##### 内部样式表\r\n当单个文件需要特别样式时，就可以使用内部样式表。你可以在 head 部分通过 <style> 标签定义内部样式表。\r\n`<head>\r\n<style type=\"text/css\">\r\nbody {background-color: red}\r\np {margin-left: 20px}\r\n</style>\r\n</head>`\r\n\r\n- ##### 内联样式\r\n当特殊的样式需要应用到个别元素时，就可以使用内联样式。 使用内联样式的方法是在相关的标签中使用样式属性。样式属性可以包含任何 CSS 属性。以下实例显示出如何改变段落的颜色和左外边距。\r\n`<p style=\"color: red; margin-left: 20px\">\r\nThis is a paragraph\r\n</p>`\r\n\r\n#### 列表\r\n- ##### 无序列表\r\n无序列表是一个项目的列表，此列项目使用粗体圆点（典型的小黑圆圈）进行标记。\r\n无序列表始于` <ul>` 标签。每个列表项始于 `<li>`。\r\n`<ul>\r\n<li>Coffee</li>\r\n<li>Milk</li>\r\n</ul>`\r\n- ##### 有序列表\r\n同样，有序列表也是一列项目，列表项目使用数字进行标记。\r\n有序列表始于 `<ol> `标签。每个列表项始于 `<li> `标签。\r\n`<ol>\r\n<li>Coffee</li>\r\n<li>Milk</li>`\r\n</ol>\r\n\r\n#### HTML <div> 元素\r\nHTML <div> 元素是块级元素，它是可用于组合其他 HTML 元素的容器。\r\n<div> 元素没有特定的含义。除此之外，由于它属于块级元素，浏览器会在其前后显示折行。\r\n如果与 CSS 一同使用，<div> 元素可用于对大的内容块设置样式属性。\r\n\r\n#### HTML <span> 元素\r\nHTML <span> 元素是内联元素，可用作文本的容器。\r\n<span> 元素也没有特定的含义。\r\n当与 CSS 一同使用时，<span> 元素可用于为部分文本设置样式属性。\r\n\r\n#### 表单\r\n表单是一个包含表单元素的区域。\r\n表单元素是允许用户在表单中（比如：文本域、下拉列表、单选框、复选框等等）输入信息的元素。\r\n表单使用表单标签（<form>）定义。\r\n```\r\n<form>\r\n...\r\n  input 元素\r\n...\r\n</form>\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JunliuHub/blog/issues/comments/206934220","html_url":"https://github.com/JunliuHub/blog/issues/15#issuecomment-206934220","issue_url":"https://api.github.com/repos/JunliuHub/blog/issues/15","id":206934220,"user":{"login":"JunliuHub","id":16153489,"avatar_url":"https://avatars.githubusercontent.com/u/16153489?v=3","gravatar_id":"","url":"https://api.github.com/users/JunliuHub","html_url":"https://github.com/JunliuHub","followers_url":"https://api.github.com/users/JunliuHub/followers","following_url":"https://api.github.com/users/JunliuHub/following{/other_user}","gists_url":"https://api.github.com/users/JunliuHub/gists{/gist_id}","starred_url":"https://api.github.com/users/JunliuHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JunliuHub/subscriptions","organizations_url":"https://api.github.com/users/JunliuHub/orgs","repos_url":"https://api.github.com/users/JunliuHub/repos","events_url":"https://api.github.com/users/JunliuHub/events{/privacy}","received_events_url":"https://api.github.com/users/JunliuHub/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T14:36:00Z","updated_at":"2016-04-07T14:36:00Z","body":"4.7完成慕课第二章"}}