HTML, CSS Basics

Source: Internet
Author: User
<span id="Label3"></p><p><p>one, the <span> tag is not semantic, its role is to set up a separate style with the</p></p><p><p>second, the</p></p><p><p>three, create four elements of the table:</p></p><p><p>table, tbody, tr, th, TD<br>1, <table>...</table>: The entire table starts with <table> marks, </table> marks the End.<br>2, <tbody>...</tbody>: When the table content is very long, the form will download a little bit, but if the <tbody> tag is added, the form will be displayed after all the contents of the table have been Downloaded. Code in the right-hand code Editor.<br>3, <tr>...</tr>: one row of the table, so there are several pairs of TR Tables.<br>4, <td>...</td>: a cell in a table with several pairs of <td>...</td> in one row, and a few columns in a ROW.<br>5, <th>...</th>: A cell in the head of a table, table Header.<br>6, the number of columns in the table, depending on the number of data cells in a ROW.</p></p><p><p>Iv. hyperlinks <a></a> href title target</p></p><p><p><a> tags also have the role of linking email addresses, using mailto to make it easy for visitors to send e-mails to website Managers. We can also use mailto to do a lot of other things.</p></p><p><p>Use the tag to insert the Image.</p></p><p><p>Grammar:</p></p><p><p></p></p><p><p>Example:</p></p><p><p></p></p><p><p>Explain:</p></p><p><p>1, Src: Identify the location of the image;</p></p><p><p>2, Alt: Specify the descriptive text of the image, when the image is not visible (when the download is unsuccessful), you can see the text specified by the attribute;</p></p><p><p>3. Title: provides a description of the image when the image is visible (the text displayed when the mouse slides over the picture);</p></p><p><p>4. The image can be an image file in Gif,png,jpeg format.</p></p><p><p><br>Vi. How does the website interact with the user? The answer is to use an HTML form (form). The form can transfer the data entered by the browser to the server side, so that the Server-side program can process the data that the table only son Over.</p></p><p><p>Grammar:<br><form method= "transfer mode" action= "server file" ></p></p><p><p>Explain:</p></p><p><p>1.<form>:<form> label is in pairs appear, start with <form>, end with </form>.</p></p><p><p>2.action: where the data entered by the browser is transmitted, such as a PHP page (save.php).</p></p><p><p>3.method: the way data is transmitted (get/post).<br><form method= "post" action= "save.php" ><br><label for= "username" > User name:</label><br><input type= "text" name= "username"/><br><label for= "pass" > password:</label><br><input type= "password" name= "pass"/><br></form></p></p><p><p>Attention:</p></p><p><p>1. All form controls (text boxes, text fields, buttons, Radio boxes, checkboxes, and so on) must be placed between the <form></form> tags (otherwise the user input information can not be submitted to the server oh!). )。</p></p><p><p>2, Method:post/get The difference this part of the content belongs to the Back-end programmer to consider the Problem. Interested partners can view the wiki in this section, which is described in Detail.</p></p><p><p>There are also comments in the css: * * Comment statement * * (use <!--comment statement in HTML)<br>inline, embedded, External</p></p><p><p>Viii. CSS selector: tag selector, class selector (.), ID selector (#), sub-selector (>),<br>Include selector (), Universal selector (*), pseudo-class Selector (hover), Group selector (,)<br>The difference between class selector and ID selector:<br>1. The ID selector can only be used once in the Document. Unlike class selectors, an ID selector can only be used once, and only once, in an HTML Document. The class selector can be used more than once.<br>2. You can use the class selector word list method to set multiple styles for an element at the same time. We can set multiple styles for one element at the same time, but only with the method of the class selector, the ID selector is not possible (the list of ID words cannot be used).<br>Contains the difference between a selector and a child selector:<br>A child selector refers only to its immediate descendants, or you can understand the first generation of descendants acting on child Elements. The descendant selector is an element that acts on all child descendants. The descendant selector is selected by a space, and the child selector is selected by >.</p></p><p><p>Ix. inheritance, Cascade and particularity of CSS<br>Some styles of CSS are Inherited.<br>Sometimes we set a different CSS style code for the same element, so which CSS style does the element enable?<br>The weight of the label is 1, and the weight of the class selector is 10,id the maximum value of the selector is 100.<br>Note: There is also a special weighted value-inheritance also has the right value but very low, some literature proposed it only 0.1, so it can be understood as the lowest weight of inheritance.<br>What if there are multiple CSS styles in the HTML file that can exist for the same element and if the multiple CSS styles have the same weight value?<br>Cascading is in the HTML file for the same element can have more than one CSS style exists, when the same weight of the style exists, according to the order of the CSS style to decide, in the back of the CSS style will be applied.<br>! Important has the highest weight value</p></p><p><p>ten, CSS Format layout<br>Xi. CSS Box model<br>In css, tag elements in HTML are broadly divided into three different types: block elements, inline elements (also called inline elements), and inline block Elements.<br>The most common block elements are:<br><div>, <p>,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.