HTML学习笔记

来源:互联网 发布:什么是域名根目录 编辑:程序博客网 时间:2024/05/21 18:10

style属性

<html><body><h1 style="font-family:arial;color:red;font-size:20px;text-align:center">This is a heading</h1><p>上面的标题相对于页面居中对齐。</p></body></html>

计算机输出标签

<html><body><code>Computer code</code><br /><kbd>Keyboard input</kbd><br /><tt>Teletype text</tt><br /><samp>Sample text</samp><br /><var>Computer variable</var><br /><p><b>注释:</b>这些标签常用于显示计算机/编程代码。</p></body></html>

块引用

<html><body>这是长的引用:<blockquote>这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。</blockquote>这是短的引用:<q>这是短的引用。</q><p>使用 blockquote 元素的话,浏览器会插入换行和外边距,而 q 元素不会有任何特殊的呈现。</p></body></html>

地址

<!DOCTYPE html><html><body><address>Written by <a href="mailto:webmaster@example.com">Donald Duck</a>.<br> Visit us at:<br>Example.com<br>Box 564, Disneyland<br>USA</address></body></html>

缩写和首字母缩写

<html><body><abbr title="etcetera">etc.</abbr><br /><acronym title="World Wide Web">WWW</acronym><p>在某些浏览器中,当您把鼠标移至缩略词语上时,title 可用于展示表达的完整版本。</p><p>仅对于 IE 5 中的 acronym 元素有效。</p><p>对于 Netscape 6.2 中的 abbr 和 acronym 元素都有效。</p></body></html>

定义著作的标题

<p><cite>The Scream</cite> by Edward Munch. Painted in 1893.</p>

文档类型


html5:<!DOCTYPE html>
html4.01:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
xhtml1.0:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

0 0
原创粉丝点击