Example: <a href = "http://www.w3school.com.cn/"> Visit W3School </a> Example 2: <p> <a href = "# C4"> View Chapter 4. </A> </p>
To open a link in a new window, set the target attribute to "_ blank"
17. image tags
Example:
The src attribute is the image position, and the alt attribute is the text display when the image cannot be loaded.
18. table <table>
The rows are defined by <tr> and the columns are defined by <td>.
The border is set through the border attribute, and the header is set with the <th> attribute
Table title <caption>
19. unordered list <ul>
<ul><li>Coffee</li><li>Milk</li></ul>
20. ordered list <ol>
<ol><li>Coffee</li><li>Milk</li></ol>
21. Custom list items <dl>
Each custom list item starts with <dt>, and each custom list item starts with <dd>.
22. The div element is for document layout, and the span element is mainly used to set style attributes for some texts.
23. Framework <frameset>
Vertical frame:
Example:
<frameset cols="25%,50%,25%"><frame src="/example/html/frame_a.html"><frame src="/example/html/frame_b.html"><frame src="/example/html/frame_c.html"></frameset>
Horizontal framework:
<frameset rows="25%,50%,25%">
24. inline framework <iframe>
<iframe src="demo_iframe.htm" frameborder="0"></iframe>
25. Insert a script <script>
<script type="text/javascript">document.write("Hello World!")</script>
26.
<Title> <base> <link> <meta> <script> <style>
<Title> define the document title
<Base> set the default address for all links on the page.
<Link> used to connect a style sheet
<Style> define style information for html documents
<Meta> specifies the page description, keywords, author of the document, last modification time, and other metadata.
TIPS:
Set background image
<body background="/i/eg_background.jpg">
Set the image alignment mode:
<P> image in text </p>
The default value is bottom.
Float a paragraph to the left or right of the paragraph:
Use the height and width attributes to zoom in or out the image
Create an image map with an area available for clicking. Each area is a hyperlink.
<map name="planetmap" id="planetmap"><areashape="circle"coords="180,139,14"href ="/example/html/venus.html"target ="_blank"alt="Venus" /><areashape="circle"coords="129,161,10"href ="/example/html/mercur.html"target ="_blank"alt="Mercury" /><areashape="rect"coords="0,0,110,260"href ="/example/html/sun.html"target ="_blank"alt="Sun" /></map>
Process empty cells:
Replace the content with & nbsp;
Set table cells for cross-row or cross-Column
Cells that span two columns:
<Th colspan = "2"> phone number </th>
Cells that span two rows
<Th rowspan = "2"> phone number </th>
Set cell margins (blank between cell content and Border)
<table border="1" cellpadding="10">
Set the cell spacing (distance between cells)
<table border="1" cellspacing="10">
Add background color or background image to the table
<table border="1" bgcolor="red"><table border="1" background="/i/eg_bg_07.gif">
Arrange content in table cells
<Th align = "right"> January </th>
Set different types of ordered lists
Change the display mode of sorting by changing the value of the type attribute.
<Ol type = "A"> sort by uppercase/lowercase letters
<Ol type = "a"> sort by lowercase letters
<Ol type = "I"> sort by Roman letters
<Ol type = "I"> sort by lowercase Roman letters
It is sorted by numbers by default.