Custom made HTML tags [closed] - html

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Just came across a project that had custom-made tags.
Something like:
<buildings>
<building-1></building-1>
<building-2></building-2>
</buildings>
(This code doesn't do anything; it's an example)
(It's not mine) (https://codepen.io/perbyhring/pen/jpQwav) What is the use of this?

Those custom HTML elements have been introduced some time ago and should make HTML code more readable.
"Those elements provide a way to build own DOM elements but also have some drawbacks as simply defining and using an element called blue-button does not mean that the elements represent a button. Tools such as Web browsers, search engines, or accessibility technology will not automatically treat the resulting element as a button just based on its defined name."
Read more about them in the html standard.

Related

What is this <lt-mirror> html tag? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last year.
Improve this question
To make the question short, I was playing with the dom, I created a text-area and noticed that an element tagged lt-mirror was generated whenever the user type something. The new element is placed just before the text-area. Couldn't find any documentation about it across the web ?
The lt-mirror tag was generated by an extension called LanguageTool, which target the text-areas and check for writing errors.
Did some research about this and found something! Okay, so the person who wrote this probably did something called custom elements. Rather than having nested, verbose elements for a page feature, you could use a custom element to make it more comprehensive and most importantly reusable!
You can create a custom element made with your classes, own methods, and properties, etc, and use it with the built-in HTML elements.
You can find more info on it here:
https://javascript.info/custom-elements
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements
https://developers.google.com/web/fundamentals/web-components/customelements
I guess it's some kind of a custom element.

Why some HTML elements aren't styleable? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Why some HTML elements like: radio buttons, check boxes, datalists... aren't styleable? I mean ... this is so bad that we have to create a custom element over the standard element so we can style it Is there any specific reason to that?
I'm not asking for workarounds for these elements, I'm asking WHY they can't be styled natively ... Is there something in the HTML specification that prevents these elements to be styled?
MDN has an explanation:
In the early days of the Web—around 1995—form controls were added to HTML in the HTML 2 specification. Due to the complexity of form widgets, implementors chose to rely on the underlying operating system to manage and render them...... Because users are accustomed to the visual appearance of their respective platforms, browser vendors are reluctant to make form controls stylable"

Why View source of the page is different than Inspecting the element of the page [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Okay I'm using Producteev.com frequently on my projects, the other day I noticed that on my workspace page, that the source of the page (Ctrl+U) is quite short and most of the page's items are not in the view source code.
but of course if you inspect the elements of the page you see the actual codes.
I'm not sure if this is the right place to ask such question but I'd like to know why is this happening and using what technology maybe? and also why they do use such techniques?
Viewing the source shows the source code.
Inspecting the DOM shows you a serialisation of the current state of the DOM after the HTML has been parsed, error corrected, normalised and (possibly) manipulated with JavaScript.
DOM elements that have been added dynamically after the page is generated will not be included in the page source.

How to create a 'p' tag using css [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am looking to create an inline style that will act the same as a <p> tag. I have perused the http://www.w3.org/TR/CSS21/ but I can't seem to find the goods. Any help is appreciated.
You can use a dev tool (like the one in chrome) and see the properties for a <p></p>, however if you're just going to use it as a <p>.. you must just use it. If you want to add few things then you can create a class that affects your <p ..>
Remember that HTML is content meaning and not meant for display, assume your tags will have the very same look, like if you open them in a plain text editor. It is valid that you want something to look like the DEFAULT in certain browser for a particular element, in this case <p>
This is how I scan defaults using chrome:

User formatting for textarea [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
A perfect example is stackoverflow. When a user types a question, the textarea give the user basic formatting options such as bullet points, numbering, italicize, etc. How can I create a similar textarea? I am currently using html, css and php.
You can use javascript (or more effectively jQuery) to create your own textarea with this behaviour, or look at an existing package such as TinyMCE and configure it to meet your requirements (the approach I would suggest): http://www.tinymce.com/
Easiest way would be to use an editor like TinyMCE: http://www.tinymce.com/
There are others as well, but TinyMCE is what I see used most.