search

HTML study notes 2

Apr 19, 2018 pm 02:32 PM
htmlstudynotes


The content of this article is about HTML learning notes 2. It has a certain reference value. Now I share it with you. Friends in need can refer to it

1 , table

<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>

......define rows, define columns

Header represents:

<tr>
<th>heading</th>
</tr>

If you want to represent a blank line, you can fill it with  space placeholder.


2. List



##First type: None Sequence listing -
    , use bold dot mark

    <ul>
    <li>Coffee</li>
    <li>Milk</li>
    </ul>


    or use
      ...use an open circle point.


      ##Second type: Ordered list——

    , use numbers to mark

    <ol>
    <li>Coffee</li>
    <li>Milk</li>
    </ol>


    Or use

      ... to indicate that the number starts from 50.



      ##Third type: Custom list——


      <dl>
      <dt>Coffee</dt>
      <dd>Black hot drink</dd>
      <dt>Milk</dt>
      <dd>White cold drink</dd>
      </dl>

      Explanation:

      indicates the beginning of the list



      ##
      Indicates list items


      Indicates the definition of list items


      ## Note that paragraphs, line breaks, pictures, links, other lists, etc. can be used inside list items.




      3. HTML class

      Classifies HTML and can An element's class defines the CSS style.


      Set the same style for the same class.

      <!DOCTYPE html>
      <html>
      <head>
      <style>
      .cities {
          background-color:black;
          color:white;
          margin:20px;
          padding:20px;
      } 
      </style>
      </head>
      
      <body>
      
      <p class="cities">
      <h2 id="London">London</h2>
      <p>
      London is the capital city of England. 
      It is the most populous city in the United Kingdom, 
      with a metropolitan area of over 13 million inhabitants.
      </p>
      </p> 
      
      </body>
      </html>



      #< ;p> is a block-level element used to set the same class.
      is an inline element.

      <html>
      <head>
      <style>
        span.red {color:red;}
      </style>
      </head>
      <body>
      
      <h1 id="My-nbsp-span-nbsp-class-red-Important-span-nbsp-Heading">My <span class="red">Important</span> Heading</h1>
      
      </body>
      </html>


      4. HTML website layout

      (1) Use

      for layout


      <head>
      <style>
      #header {
          background-color:black;
          color:white;
          text-align:center;
          padding:5px;
      }
      #nav {
          line-height:30px;
          background-color:#eeeeee;
          height:300px;
          width:100px;
          float:left;
          padding:5px;	      
      }
      #section {
          width:350px;
          float:left;
          padding:10px;	 	 
      }
      #footer {
          background-color:black;
          color:white;
          clear:both;
          text-align:center;
         padding:5px;	 	 
      }
      </style>
      </head>

      Use


      (2) HTML5 Provided new semantic elements



      Defines the header of a document or section

      < ;nav>Define a container for navigation links


      ##
      Define a section in a document



      ##

      Define the footer of a document or section


      ##
      Define additional details

      Define the title of the details element



      ##5. Frames


      By using frames, more than one page can be displayed in the same browser window. Each HTML document becomes a frame, and each frame is independent of other frames.



      ## (1) Frame structure tag

      Each defines a series of columns Rows and columns



      The value of rows/columns specifies the area of ​​the screen occupied by each row or column

      <frameset cols="25%,75%">
         <frame src="frame_a.htm">
         <frame src="frame_b.htm">
      </frameset>

      (2) Others

      Generally, a frame has a visible border, and the user can drag the border to change its size. If you want to avoid it, you can add noresize="noresize" to .



      #The tag and the tag cannot be used at the same time. However, when adding a tag that contains a piece of text, the text must be nested within the tag. <p><pre class='brush:php;toolbar:false;'>&lt;html&gt; &lt;frameset cols=&quot;25%,50%,25%&quot;&gt; &lt;frame src=&quot;/example/html/frame_a.html&quot;&gt; &lt;frame src=&quot;/example/html/frame_b.html&quot;&gt; &lt;frame src=&quot;/example/html/frame_c.html&quot;&gt; &lt;noframes&gt; &lt;body&gt;您的浏览器无法处理框架!&lt;/body&gt; &lt;/noframes&gt; &lt;/frameset&gt; &lt;/html&gt;</pre></p> <frame>You can use the name anchor attribute to jump to the specified section. <p><br></p> <p><br></p> <p><br>##<iframe>Used to display web pages within web pages</iframe></p> <p>Usage:<iframe src="URL" width="200" height="200" frameborder="0"></iframe></p> <p><br></p> <p><br></p> <p>iframe可用作链接的目标(target),该链接的target属性必须引用iframe的name属性。</p><pre class='brush:php;toolbar:false;'>&lt;iframe src=&quot;demo_iframe.htm&quot; name=&quot;iframe_a&quot;&gt;&lt;/iframe&gt; &lt;p&gt;&lt;a href=&quot;http://www.w3school.com.cn&quot; target=&quot;iframe_a&quot;&gt;W3School.com.cn&lt;/a&gt;&lt;/p&gt;</pre><p><br></p> <p>注意,由于链接的目标匹配iframe的名称,所以链接会在iframe中打开。</p> <p>相关推荐:</p> <p><a href="http://www.php.cn/div-tutorial-393431.html" target="_self">HTML学习笔记一</a></p>

......

The above is the detailed content of HTML study notes 2. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools