In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what is the basic grammar of HTML. It is very detailed and has certain reference value. Friends who are interested must finish reading it.
Log in
Log in
Tags are placed in angle brackets, appear in pairs, and are closed (start-end tag, self-closing tag)
/ / content
Tags can be written with one or more attributes: attribute name = "attribute value" multiple attributes are separated by spaces
Tags can be nested and closed in nesting order
/ / when the browser encounters a comment, it automatically ignores the comment content
Explanation: when the HTML structure of the page is complex or has a lot of content, you need to add the necessary comments to facilitate code reading and maintenance.
Debugging: temporarily comment out some unnecessary HTML code to preview the effect
Writing specification: lowercase, attribute values in double quotes, nested indentation (clear code, easy to maintain)
Common attributes (global attributes): attributes that are valid for all tags
Id attribute: specifies the unique identity of the element in the page
Class attribute: specifies the class name of the element. Elements with uniform functions or styles on the page can be used.
Style attribute: specifies the style of the element. You can write the CSS style directly in the style attribute, but the structure and presentation are mixed, which is not conducive to maintenance.
Title attribute: specifies some additional information about the element, which will be displayed when you move the mouse over the element, such as displaying incomplete content or explaining the meaning of the chart.
/ / the difference between id and class: the same class can appear multiple times on the page, while id can only appear once.
Row-level elements & block-level elements
Row-level elements: (default width) content width, (can width and height be set) No, (start position) peer display
Block-level element: (default width) parent element width, (can width and height be set), (starting position) line wrap, that is, exclusive line
/ / for more information, CSS-display sets the display mode of elements.
Block (block level element) div,p,h2~h7,ul,form...
Inline (row-level element) span,a,label,cite,em...
The above is all the content of the article "what is the basic Grammar of HTML". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.