Home > Web Front-end > HTML Tutorial > 15 basic HTML tips you must master

15 basic HTML tips you must master

零下一度
Release: 2017-05-02 15:02:26
Original
1315 people have browsed it

Hypertext Markup Language, which we often call HTML, is a standard markup language used to create web pages. It is composed of a series of HTML tags. Most HTML tags appear in pairs, such as opening tags and closing tags. But there are also some tags that have no content and do not have closing tags, for example.

Hypertext Markup Language, which we often call HTML, is a standard markup language used to create web pages. It is composed of a series of HTML tags. Most HTML tags appear in pairs, such as

< h1> < /h1 > , which are the start tag and the end tag respectively. But there are also some tags that have no content and do not have an end tag.

Here are 15 frequently asked questions about HTML for everyone to learn and refer to.

1.What does HTML stand for?
Answer: HyperText Markup Language, hypertext markup language.

2.What is HTML used for?
Answer: HTML is the standard markup language used to create web pages.

3.What is DOCTYPE?
Answer: It will tell the browser the type of document and which version of the HTML specification it is written in.

4.What are the tags in HTML?
Answer: The tag will tell the browser how to parse the content.

5. How to write tags in HTML?
Answer: General format: < tagname > content < /tagname> , usually appears in pairs, such as < p> < /p > , they are called start tags and end tags respectively.

6.What is the structure of tags in HTML documents?
Answer: HTML documents follow the following format:

 < html>
      < head>  
          < title>
              My title.
          < /title>
      < /head>
      < body>
          Main body of text.
      < /body>
  < /html>
Copy after login

7. How to represent hyperlinks in HTML?
Answer: You can click on a text, image or other element with a hyperlink to jump to another page. Its general format: < a href="url"> link text< /a> , the href attribute represents the target address to jump to. For example < a href="http://www.php100.com"> PHP100 Chinese website< /a>

8. What are attributes in HTML?
Answer: The attribute provides specific information about an element. It is usually written in the opening tag, usually in the format of "name=vlaue".

9. How to comment in HTML?
Answer: The label of the comment is < !-- Comment content --> , in the middle is the content of the comment to be inserted.

10.What does CSS stand for?
Answer: Cascading Style Sheets, hierarchical style sheets.

11. How many methods are there to add CSS styles to HTML?
Answer: There are three ways to add styles to HTML elements. The first is to directly assign a value to the style attribute of the element, and the second is to add a style to the head of the HTML document < head> < /head> , add the < style> element, and add the style in < style> < /style>. The third method is to introduce the CSS file in the HTML header, that is, make the CSS style adding rules into a separate file.

12. How to add pictures?
Answer: Use the < img> tag, note that it has no closing tag, and indicate the path to insert the image by assigning a value to its src attribute. Such as< img src="abc.jpg" alt="This is a picture">

13. How to represent the table?
Answer: Use the < table> tag, where < tr> represents a row in the table, and < td> represents the content of the table. Such as:

< table>
      < tr>  
          < td> R1,C1< /td>
          < td> R1,C2< /td>
       < /tr>  
        < tr>  
          < td> R2,C1< /td>
          < td> R2,C2< /td>
      < /tr>
< /table>
Copy after login

14. How to represent a list?
Answer: < ul> represents an unordered list, < li> < ol> represents an ordered list, < li> represents a list item.

15. What are < p> and < span> elements?
Answer: < p> is a block-level element that can be used as a container for other HTML elements to distinguish different regional content; while < span> is an inline element and is generally only used as a container for a piece of text.

The above is the detailed content of 15 basic HTML tips you must master. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template