Use the text-transform property.
style.css (Example)body
{text-transform: uppercase;}
This example makes any text in the
tag uppercase (In the browser, of course. Not the source code).To change text to just the H1 tag:
h1{
text-transform: uppercase;
}
.smaller caps{
text-tranform: capilalize;
font-size: xx px or xx pt or small or however
}
in the stylesheet
or <p style="text-tranform: capilalize; font-size: xx px or xx pt or small">
for inline
Place it between <b> Your Text Here </b>
Bold is symbolized by a <b> in front of the text you want bold, and a </b> at the end of the area you want bold.
Use font-weight with bold, like this:
<span style ="font-weight:bold;">This text is bold</span>
The font style is made italic and the font weight is bold. For example:
<span style ="font-style:italic; font-weight:bold">This text is bold and in italics. </span>
<b>text here</b>
Tags that are styled with CSS defining bold text may look like this. Tags that are styled with CSS defining italicized text may look like this. Tags that are styled with CSS defining text that is strike-through'ed may look like this.
This example uses CSS in the head section of the HTML document: (the CSS has been highlighted in bold)CSS Exampleh1{color:blue;}.green{color:green;font-size:48px;}p.red{color:red;}This heading is in blue.This bold text is green and very large.This paragraph is in redHowever, this text is black as it is not a paragraph.
in css - layout font-size: 36;
Technically speaking, the HTML code to guarantee that text will be bold is the bold-faced tag: <b>Bold Text Here</b> The bold-faced tag is available in HTML 4 and 5, but was deprecated in XHTML. The tag isn't semantic. If you want a more semantic solution (or if you're in XHTML) you'll want to use the <strong> tag. It works exactly the same way, and most browsers display <strong>Text</strong> as bold by default. However, to ensure that the strong tag remains bold, you also have to add a definition to your CSS. strong {font-weight: bold;}
To define the color of the text w/ CSS, it is {color:[color of text];} Ex.: body{color:#0000ff;}
Tags that are styled with CSS defining bold text may look like this. Tags that are styled with CSS defining italicized text may look like this. Tags that are styled with CSS defining text that is strike-through'ed may look like this.
In XHTML, you can use the <strong> tag, which by default makes it bold in all major browsers. You can also use any other tag you feel like styling for boldness, such as <span class="bold"> <strong>Bold Text</strong> Or <span class="bold">Bold Text</span> With the CSS rule strong, span.bold {font-weight:bold;} In HTML 4 and HTML5, you have the <b> tag, which makes things bold by default. In HTML 4, this is by definition. In HTML 5, you still want to include the CSS, as the <b> tag is NOT bold by definition <b>Bold Text</b> CSS rule: b {font-weight:bold;} The <strong> tag will also work in HTML5.
CSS is used to add style to HTML documents. HTML is designed to code the elements of a webpage, like text and pictures. CSS (Cascading Style Sheets) is used to define how they look (color, size, bold, etc.). CSS was used to fix a problem created when HTML tries to define how a page looks. It is now not acceptable to have HTML tags like <b> (which makes text bold). You should now include all of that information in CSS.
nikunj
This example uses CSS in the head section of the HTML document: (the CSS has been highlighted in bold)CSS Exampleh1{color:blue;}.green{color:green;font-size:48px;}p.red{color:red;}This heading is in blue.This bold text is green and very large.This paragraph is in redHowever, this text is black as it is not a paragraph.
Use .style.fontWeight to refer to that property. For example: var myHTMLElement=document.getElementById("myElement"); myHTMLElement.style.fontWeight="bold"; //Makes text in that element bold
Bold: <b>text here</b> Itallic:<i>text here</b>
in css - layout font-size: 36;
Technically speaking, the HTML code to guarantee that text will be bold is the bold-faced tag: <b>Bold Text Here</b> The bold-faced tag is available in HTML 4 and 5, but was deprecated in XHTML. The tag isn't semantic. If you want a more semantic solution (or if you're in XHTML) you'll want to use the <strong> tag. It works exactly the same way, and most browsers display <strong>Text</strong> as bold by default. However, to ensure that the strong tag remains bold, you also have to add a definition to your CSS. strong {font-weight: bold;}
To define the color of the text w/ CSS, it is {color:[color of text];} Ex.: body{color:#0000ff;}
Yes, bold is an HTML text feature. You use the <b> tag to display bold text.
If you have already typed the text if you highlight it using the right mouse button you can then click the bold button and it will change the text to bold. If you are using something such as google documents then you can use key board shortcuts and instead of clicking the bold button you can hold ctrl and click b to activate bold.