Home  >  Article  >  Web Front-end  >  XHTML CSS writes a formal BLOG_HTML/Xhtml_Web page production

XHTML CSS writes a formal BLOG_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:45:151428browse

The full name of Blog should be Web log, which means "network log" in Chinese. It was later abbreviated to Blog, and a blogger (Blogger) is the person who writes a Blog. From an understanding point of view, a blog is "a publishing method that expresses personal thoughts, network links, and content, arranged in chronological order, and continuously updated." Simply put, bloggers are a type of people who are used to writing diaries online. How to use HTML and CSS to write a beautiful and formal BLOG:
Use the a tag correctly
Hyperlink is the most commonly used html tag in blogs. It is used to link to other articles or sites. For links, it is recommended that you add the following attributes when using the a tag:
href: Set the url address or anchor point of the link
target: Set the target window or frame page after the mouse clicks on the link. The commonly used one is target. ="_blank" means opening a new window to open the link. You don’t need to add this attribute when opening the link on the current page.
title: Set the prompt information displayed when the mouse moves over the link.
rel: This is a recent development. New properties are starting to become popular. rel="nofollow" means to prohibit search engines from linking to this site and causing changes in the pagerank value of the linked URL. It is often used to prevent spam links; rel="tag" is set for technorati to use the text of this link as the page. tag tag.
Don’t have too many links in the article. Too many links will make readers feel depressed and nervous when reading. If the contrast between the color of the link and the color of the text is too great, it will also make people look dazzled. The best link effect is a light color contrast or underlining, and filling in the title attribute to indicate what the content of the link is or why it is linked. Sometimes you can also attach links related to this article and annotate them in a list at the end of the article.
Develop a good habit of dividing articles into paragraphs
Writing a blog cannot be like one sentence per paragraph like Gu Long’s novel, so it is uncontroversial to write a blog according to the writing style taught by the teacher when I was a student. . It is recommended to use the p tag to segment the article. The code is as follows:

Article text

.
It is worth mentioning that many bloggers do not have the habit of indenting the first line. Some only type a few spaces in the editor. Here is the code for indenting the first line using the text-indent attribute of CSS:

Article text

, the indentation unit is generally 2em, which represents two Chinese characters. Do not use percentages or other unit lengths such as px, pt, etc. Em can maintain the distance between two Chinese characters when the page font and layout are scaled. indentation.
For some bloggers who like to hang pictures in their articles, it is recommended to set the align attribute of the img tag to left or right to easily hang the pictures and wrap the text. You can also use the float attribute of the div tag to hang left and right to wrap text. Even better, you can hang left and right Google Adsense ads. Code:
You can put image links here, or put them like foreign blogs. google adsense code
.
Use list to list, use line-height to set the row height
Use tags such as
    1. of the style sheet list to list some subtitle entries, code:
      • Question 1
      • Question 2
      .
      The font size of the main text can be set according to personal preference. Generally, the default one of the blog system is used (13pt, Song Dynasty and courier new). If the main text requires a large font and your text appears to be too large and stacked, you can use the

      Add the style: line-height:120%; this means that the line height is 1.2 times the font.
      Typesetting skills for super long text
      Although we all know that it is better to keep articles short and concise when writing blogs, it is inevitable that some articles of special nature need to be long. At this time, it is recommended Use

      ...

      to set subtitles at different levels, and use the four definition list tags
      at the top of the article to display the effect just like word The style of the table of contents/index in the article can increase the readability and organization of the article. Many articles in Microsoft's MSDN are arranged in this way. To implement the link jump function, you can use the anchor tag to modify the specific subtitle, code:

      Title 1

      .
      Some other html commonly used in blogs
      It is recommended to use the
      tag to quote fragments of other people's articles. This tag can automatically realize the indentation of the left and right ends of the page. Generally, the default indentation is 40 pixels. , for example:
      This is an example of citation style
    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