Jump to content

SSteven

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About SSteven

  • Rank
    Newbie
  1. SSteven

    How to center text in an SVG graphic?

    Thanks for this info. It works perfectly for the horizontal centering. However, vertically, it doesn't appear to be centered. Is there any way to center SVG text vertically? There doesn't appear to be an attribute of <text> for this. Is there a way to do it using JS? (eg: to return the height of the text (th) and the height of the banner (bh) and then do (bh - th)/2, for instance?)
  2. SSteven

    Feedback on web page's semantic elements

    Thanks for the review. Your points are all well-taken.
  3. The following HTML creates an SVG rectangle containing a horizontal linear gradient and text, intended as a Banner. https://jsfiddle.net/SSteven/z7umqfpw/ Note that the text is not centered. How do I center the text? I tried the following, using some information on the web: https://stackoverflow.com/questions/41822510/center-an-svg-inside-a-div However, my attempt doesn't work: https://jsfiddle.net/SSteven/5jg7xhwu/
  4. SSteven

    Code indentation in HTML

    >> most better editors do this automatically, with ability to collapse areas of html Notepad++ (with a popularity rating of 20% by users of this website) doesn't seem to auto-indent. Which editor has an auto-indent feature? w3schools suggests an indentation level of 2 spaces, and I'm looking for an editor with 2-space auto-indentation. Thanks.
  5. SSteven

    Code indentation in HTML

    In programming languages (such as Javascript, C++, etc.), indentation of code is a best practice. In markup languages such as HTML, is code indentation a best practice?
  6. I request an evaluation of the following web page, especially on the use of semantic elements: https://jsfiddle.net/SSteven/qt9d2sfw/ Specifically: 1) At the top, 2 images are supposed to be displayed. (Currently, their alt text is displayed.) I have treated this as the <header>. I have used "float: left" to display both images horizontally. Is the code for the header element and its sub-elements OK? 2) The top menu has been displayed in an <nav> element, which has been styled along with its sub-elements. 3) The "side menu" has been included in an <aside> element. 4) The <main> element contains an <article> element, which has the main content. Both the "side menu" and the <main> element are floated horizontally. 5) Finally, there is a <footer> element. Basically, I'd like to ask: 1) Is the use of the semantic elements correct? 2) Is their styling done correctly or is there a better way? I'd also like to ask about indentation guidelines for HTML code. I have indented the HTML code. What is the normal practice? Thanks.
×