aquaben Posted August 24, 2010 Share Posted August 24, 2010 Newb with newb questionHow do we do a "tab"(indent) in our paragraphes in either HTML or CSS? Link to comment Share on other sites More sharing options...
ShadowMage Posted August 24, 2010 Share Posted August 24, 2010 CSS text-indent. Link to comment Share on other sites More sharing options...
Ingolme Posted August 24, 2010 Share Posted August 24, 2010 The text-indent property will indent the first line of the paragraph. If you want the entire paragraph indented, you may use the margin-left property.You can't have nested <p> elements, so if you want levels of indentation use <div> elements or other blocks that might be more semantically correct. Link to comment Share on other sites More sharing options...
aquaben Posted August 24, 2010 Author Share Posted August 24, 2010 The text-indent property will indent the first line of the paragraph. If you want the entire paragraph indented, you may use the margin-left property.You can't have nested <p> elements, so if you want levels of indentation use <div> elements or other blocks that might be more semantically correct.So i would add it in here<html><head><style type="text/css">body{background-color:#A46FCC;background-image:url('17.jpg');background-repeat:no-repeat;}h1 {text-align:center;}h2 {text-align:center;}h3 {text-align:left;)h4{text-align:left;}h5{text-align:center}h1{color:#B7FEF4}h2{color:#B7D3FE}h3{{color:#CFFEB7}h4{color:#FEDA87}h5{color:red}h3 {text-indent:50px;}h4 {text-indent:50px;}<div class="img"> <a target="_blank" href="18.jpg"><img src="18.jpg" alt="wedding" width="110" height="90" /></a> <div class="desc">08-01-2009</div></div><meta name="keywords" content=" ><meta name="description" content="><meta name="revised" content=" ></style></head> Link to comment Share on other sites More sharing options...
aquaben Posted August 24, 2010 Author Share Posted August 24, 2010 Or would i use it more at the <p {text-indent:50px;}> text here? </p> Link to comment Share on other sites More sharing options...
thescientist Posted August 24, 2010 Share Posted August 24, 2010 it depends. in the first post you are applying it to header elements, and in the second one you are (trying to) assign it to a <p> element, yet neither of them are in your example post. you have to use style="text-indent:50px" if you are trying to do inline styles.like Ingolme said, text indent would only work for the first line of a paragraph. If you are interested in indenting and entire block of text, consider the padding or margin properties. Link to comment Share on other sites More sharing options...
aquaben Posted August 25, 2010 Author Share Posted August 25, 2010 I'm just trying to ident the first line of every paragraph on the website im creating. Link to comment Share on other sites More sharing options...
aquaben Posted August 25, 2010 Author Share Posted August 25, 2010 Got it working thx guys Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.