Home
About Me
Contact

Upcoming!


Upcoming!


The styles attribute to almost any tag

The style attribute is an attribute to almost any tag.It is used in the body tag only. For example, you can add the
styles attribute to a heading tag, or a paragraph tag, and many others, which you will learn later. If you want
to use different font styles, font sizes and font colors for different texts, like a different font for each paragraph,
or for different headings, it is more efficient to use the style attribute instead of typing the font tag over and over
again. The style attribute is better if you want to use multiple fonts because the font tag also has a closing tag.
But if you type the style attribute along with the heading or paragraph tag, you can have different fonts for
different headings, paragraphs, tables and many more. It is used only in the startng tag of its parent tag.
It isn't used in the closing tag of its parent tag You should always use a semicolon after style. It's syntax looks like this:


<tagname(p or h1 and some others) style= "font-color: blue; font-size: 10px; ">The text goes here... </tagname>



Hexadecimal Values

If you want to use other less-commonly used colors, like light gray, navy blue, vermillion, and so on. If you want to use such not-so-common colors, and you type, for example, style = "color: "

<!DOCTYPE html>
The <!DOCTYPE html> tag marks the start of the html program. It doesn't have any ending tag.

<html lang="en">
The <html lang = "en"> tag acts as the container for all the html code.

<body>
The <body> tag contains all the text that is displayed on the webpage.

<p> The paragraph tag which holds the text content of the webpage. These are not used for headings.
This text is gonna be boldalic The text inside the <p> tag is displayed on the screen.
<b> This is the starting tag for the bold tag, which renders the text inside it bold.
<i> This is the starting tag for the <i> tag. It italicizes the text within it. It is used to desribe the type of the text.
boldalic! The text inside the bold and italics tag is both bold and italicized.
</i> This is the closing tag
for the <i> tag. It
italicizes text within it.
It is used to desribe the
type of the text.
</b> This is the closing tag for the bold tag, which renders the text inside it bold. I just made that word up, there's nothing like boldalic!
( The text inside the <p> tag is displayed on the screen.
<b> This is the starting tag for the bold tag, which renders the text inside it bold.
bold The text inside the bold tag is rendered bold.
</b> This is the closing tag for the bold tag, which renders the text inside it bold.
+ The text inside the <p> tag is displayed on the screen.
<i> This is the starting tag for the <i> tag. It italicizes the text within it. It is used to desribe the type of the text.
italics The text inside the <p> tag is displayed on the screen.
</i> This is the closing tag
for the <i> tag. It
italicizes text within it.
It is used to desribe the
type of the text.
)! The text inside the <p> tag is displayed on the screen.
</p> This is the closing
tag for the <p> tag.

</body>
This is the closing tag of the <body> tag.

</html>
This is the closing tag of the <html lang = "en"> tag.


<< Previous Next >>

Courses:

Javascript CSS HTML

Glossary

Centel Technologies © 2020
All rights reserved.