The best HTML CSS Look! Styles and colors Tutorial In 2024, In this tutorial you can learn Try - Example,How to Use CSS,Inline style,HTML Style Example - Background Color,Examples,HTML Style Example - Font, font color, font size,Examples,HTML Style Example - Text Alignment,Examples,Internal style sheet,External style sheet,HTML style tags,Deprecated tags and attributes,
CSS (Cascading Style Sheets) for rendering HTML element tag style.
HTML using style
This example demonstrates how to use the information to add to the style <head> section of the HTML format.
This example demonstrates how to use a style attribute do not underline links.
How to use the property to make a style not underlined links.
Link to an external stylesheet
This example demonstrates how Tags link to an external stylesheet.
In HTML 4, CSS is used, in order to better render HTML elements introduced.
CSS can be added to HTML in the following ways:
The best way is through an external CSS file references.
In this site HTML tutorial we use inline CSS styles to introduce an instance, which is to simplify the example, but also makes it easier for you to edit the code online and online running instance.
You can site CSS tutorial, CSS tutorial to learn more CSS knowledge.
When special style needs to be applied to individual elements, you can use inline styles. Use inline style is to use the style attribute in the relevant tag. Style attribute can contain any CSS property. The following example shows how to change the color of the paragraph and the left margin.
Learn more styles, please visit CSS tutorial .
Background color background color attribute (background-color) define an element:
Early background color attribute (background-color) is to use the bgcolor attribute definition.
Try: Older HTML to set the background mode
We can use the font-family (font), color (color), and font-size (font size) to define the style of the font attributes:
Now commonly used font-family (font), color (color), and font-size (font size) attributes to define text styles, instead of using the <font> tag.
Use text-align (text alignment) level attribute specifies the vertical alignment of the text:
Text-align text-align property to replace the old label <center>.
When a single file requires special style, you can use an internal stylesheet. You can <head> section by <style> tag defines internal style sheet:
When the style needs to be applied to many pages, the external style sheet would be the ideal choice. Use external style sheet, you can change a file to change the appearance of the entire site.
标签 | 描述 |
---|---|
<style> | 定义文本样式 |
<link> | 定义资源引用地址 |
In HTML 4, the original support custom HTML element style tags and attributes have been deprecated. These labels will not support the new version of HTML tags.
Deprecated labels: <font>, <center>, <strike>
Deprecated attributes: color and bgcolor.