⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 html_styles.asp@output=print

📁 W3Schools tutorial..web designing
💻 ASP@OUTPUT=PRINT
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>HTML Styles</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>
<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>


<h1>HTML Styles</h1>
<a href="html_whyusehtml4.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_head.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<hr />

<p class="intro">With HTML 4.0 all formatting can be moved out of the HTML document and into a
separate style sheet.</p>

<hr />

<h2>Examples</h2>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_style">Styles in HTML</a><br />
This example demonstrates how to format an HTML document with style information
added to the &lt;head&gt; section.</p>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_linknoline">Link that is not underlined</a><br />
This example demonstrates how to make a link that is not underlined, using a
style attribute.</p>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_link">Link to an external style sheet</a><br />
This example demonstrates how to use the &lt;link&gt; tag to link to an external
style sheet.</p>

<hr />
<h2>How to Use Styles</h2>
<p>When a browser reads a style sheet, it will format the document according to
it. There are three ways of inserting a style sheet:</p>
<h3>External Style Sheet</h3>
<p>An external style sheet is ideal when the style is applied to many pages.
With an external style sheet, you can change the look of an entire Web site by
changing one file. Each page must link to the style sheet using the &lt;link&gt;
tag. The &lt;link&gt; tag goes inside the head section.</p>
<table width="100%" class="ex" cellspacing="0" border="1">
    <tr>
      <td>
        <pre>&lt;head&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot;
href=&quot;mystyle.css&quot;&gt;
&lt;/head&gt;</pre>
      </td>
    </tr>
</table>
<h3>Internal Style Sheet</h3>
<p>An internal style sheet should be used when a single document has a unique
style. You define internal styles in the head section with the &lt;style&gt;
tag.</p>
<table width="100%" class="ex" cellspacing="0" border="1">
    <tr>
      <td>
        <pre>&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
body {background-color: red}
p {margin-left: 20px}
&lt;/style&gt;
&lt;/head&gt;</pre>
      </td>
    </tr>
</table>
<h3>Inline Styles</h3>
<p>An inline style should be used when a unique style is to
be applied to a single occurrence of an element.</p>
<p>To use inline styles you use the style attribute in the relevant tag. The
style attribute can contain any CSS property. The example shows how to change
the color and the left margin of a paragraph:</p>
<table width="100%" class="ex" cellspacing="0" border="1">
    <tr>
      <td>
        <pre>&lt;p style=&quot;color: red; margin-left: 20px&quot;&gt;
This is a paragraph
&lt;/p&gt;</pre>
      </td>
    </tr>
</table>
<p>
To learn more about styles, visit our <a href="../css/default.asp"> CSS tutorial</a>.
</p>
<hr />
<h2>Style Tags</h2>
<table class="ex" cellspacing="0" border="1" width="100%">
<tr>
<th align="left">Tag</th>
<th align="left">Description</th>
</tr>
<tr>
<td><a href="../tags/tag_style.asp">&lt;style&gt;</a></td>
<td>Defines a style definition</td>
</tr>
<tr>
<td><a href="../tags/tag_link.asp">&lt;link&gt;</a></td>
<td>Defines a resource reference</td>
</tr>
<tr>
<td><a href="../tags/tag_div.asp">&lt;div&gt;</a></td>
<td>Defines a  section in a document</td>
</tr>
<tr>
<td><a href="../tags/tag_span.asp">&lt;span&gt;</a></td>
<td>Defines a section in a document</td>
</tr>
<tr>
<td><a href="../tags/tag_font.asp">&lt;font&gt;</a></td>
<td class="deprecated">Deprecated. Use styles instead</td>
</tr>
<tr>
<td><a href="../tags/tag_basefont.asp">&lt;basefont&gt;</a></td>
<td class="deprecated">Deprecated. Use styles instead&nbsp;</td>
</tr>
<tr>
<td><a href="../tags/tag_center.asp">&lt;center&gt;</a></td>
<td class="deprecated">Deprecated. Use styles instead</td>
</tr>
</table>
<br /><hr />
<h2>Joke</h2>
<p>
<b>Customer:</b> Hello, it's me!<br />
<b>Support:</b> It's me too!<br />
<b>Customer:</b> No, Esmie. E, s, m, i, e!<br />
<b>Support:</b> Sorry!
</p>
<hr />
<a href="html_whyusehtml4.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_head.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -