码迷,mamicode.com
首页 > Web开发 > 详细

HTML01

时间:2017-03-31 13:25:24      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:编程语言   graph   example   splay   type   init   斜杠   lin   oat   

 HTML(Hyper Text Markup )是用来描述网页的一种语言,而非编程语言,是一种超文本标记语言

HTML文档=网页

 

<img scr="k.jpg" width="200" height="100" />

<a href="http://www.***.com">This is a link</a>

无下划线的链接<a href="/example/html/lastpage.html" style="text-decoration:none">This is a link</a>

<hr />定义水平线

<br />单个换行

<!-- This is a comment -->注释

注释行结尾处的两道斜杠(//)是JavaScript注释符号。这可以避免JavaScript执行-->标签

<script type="text/javascript">
<!--
function displayMsg()
{
alert("Hello World!")
}
//-->
</script>

HTML属性实例


属性描述
class classname 规定元素的类名(classname)
id id 规定元素的唯一 id
style style_definition 规定元素的行内样式(inline style)
title text 规定元素的额外信息(可在工具提示中显示)

 

 

 

 

style 属性淘汰了旧的 <font> 标签。
style 属性淘汰了旧的 "align" 属性

HTML与CSS样式表

内联样式表

<p style="color: red; margin-left: 20px">
This is a paragraph
</p>

内部样式表

<head>

<style type="text/css">
body {background-color: red}
p {margin-left: 20px}
</style>
</head>

外部样式表

<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>


 

HTML01

标签:编程语言   graph   example   splay   type   init   斜杠   lin   oat   

原文地址:http://www.cnblogs.com/gzoof/p/6598181.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!